Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
GeneralRe: object destroy Pin
George_George19-Apr-08 4:19
George_George19-Apr-08 4:19 
GeneralRe: object destroy Pin
Dave Kreskowiak19-Apr-08 4:38
mveDave Kreskowiak19-Apr-08 4:38 
GeneralRe: object destroy Pin
Zoltan Balazs19-Apr-08 4:50
Zoltan Balazs19-Apr-08 4:50 
GeneralRe: object destroy Pin
Dave Kreskowiak19-Apr-08 7:06
mveDave Kreskowiak19-Apr-08 7:06 
GeneralRe: object destroy Pin
George_George19-Apr-08 20:58
George_George19-Apr-08 20:58 
GeneralRe: object destroy Pin
George_George19-Apr-08 20:57
George_George19-Apr-08 20:57 
GeneralRe: object destroy Pin
George_George19-Apr-08 20:50
George_George19-Apr-08 20:50 
GeneralRe: object destroy Pin
Guffa19-Apr-08 4:09
Guffa19-Apr-08 4:09 
George_George wrote:
1. When instance of Class1 is put to GC queue, its wrapped Obj instance is 100% ensured to move to GC queue, but the order of whether the memory and Finalize method of Class1 instance or obj1 instance will be called first can not be decided (GC may make different decision in different situations)?


When there are no more active references to the Class1 object, the references inside the object are automatically inactive. If there are no other references to the Component object, it's collectable at the exact same time as the Class1 object is collectable.

If you would have declared any Finalizer for the class, and if the Component class as a Finalizer, it's true that you can't foresee in what order they would be called.

George_George wrote:
2. If some instance does not hold the reference of Class1, but holds the reference to obj1 through public method PassOut, in this situation, Class1 instance is prevent from being GCed?


No.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: object destroy Pin
George_George19-Apr-08 4:23
George_George19-Apr-08 4:23 
GeneralRe: object destroy Pin
Dave Kreskowiak19-Apr-08 4:28
mveDave Kreskowiak19-Apr-08 4:28 
GeneralRe: object destroy Pin
George_George19-Apr-08 4:52
George_George19-Apr-08 4:52 
GeneralRe: object destroy Pin
Guffa19-Apr-08 4:37
Guffa19-Apr-08 4:37 
GeneralRe: object destroy Pin
George_George19-Apr-08 4:51
George_George19-Apr-08 4:51 
GeneralRe: object destroy Pin
Guffa19-Apr-08 5:30
Guffa19-Apr-08 5:30 
GeneralRe: object destroy Pin
George_George19-Apr-08 20:48
George_George19-Apr-08 20:48 
GeneralRe: object destroy Pin
Dave Kreskowiak19-Apr-08 7:12
mveDave Kreskowiak19-Apr-08 7:12 
GeneralRe: object destroy Pin
George_George19-Apr-08 20:48
George_George19-Apr-08 20:48 
QuestionOn Media player Pin
varun.g19-Apr-08 1:12
varun.g19-Apr-08 1:12 
GeneralRe: On Media player Pin
Anthony Mushrow19-Apr-08 2:09
professionalAnthony Mushrow19-Apr-08 2:09 
QuestionHow to create MultiColumn ListBox Pin
Muhammad Gouda18-Apr-08 23:36
Muhammad Gouda18-Apr-08 23:36 
GeneralRe: How to create MultiColumn ListBox Pin
Rob Smiley19-Apr-08 0:20
Rob Smiley19-Apr-08 0:20 
GeneralRe: How to create MultiColumn ListBox Pin
Muhammad Gouda19-Apr-08 3:30
Muhammad Gouda19-Apr-08 3:30 
GeneralRe: How to create MultiColumn ListBox Pin
Rob Smiley19-Apr-08 3:48
Rob Smiley19-Apr-08 3:48 
GeneralRe: How to create MultiColumn ListBox Pin
Charith Jayasundara20-Apr-08 2:56
Charith Jayasundara20-Apr-08 2:56 
GeneralRe: How to create MultiColumn ListBox Pin
Muhammad Gouda20-Apr-08 4:46
Muhammad Gouda20-Apr-08 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.