Click here to Skip to main content
15,896,730 members
Home / Discussions / C#
   

C#

 
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 
George_George wrote:
1. If both of them have Finalizer methods, the order of whether Finalizer method of class1 or Finalizer method of obj1 is called is not decided;


George_George wrote:
2. If both of them do have Finalizer methods, the order of whether class1 or obj1's memory will be reclaimed is not decided.


True. There is never a decision on finalization and memory reclaim orders, no matter what the situation. Since the GC walks the managed heap object tree looking for objects that no longer have references to them, it can encounter objects in any order in memory, hence no order is deterministically possible.


By your statements, it also seems as though you have the meaning of Class and Object a bit confused. Classes never have a reference to anything. It's just a template to create an object with. An Object is an instance of a Class. So your 1st statement should actually be:

...in the situation when Object1 is the only instance that holds the reference to Object2.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




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 
GeneralCrystal Report Work with C# Pin
Thaer Hamael18-Apr-08 23:05
Thaer Hamael18-Apr-08 23:05 
GeneralRe: Crystal Report Work with C# Pin
Bert delaVega19-Apr-08 0:38
Bert delaVega19-Apr-08 0:38 
GeneralPerformanceCounter Problem Pin
stancrm18-Apr-08 23:00
stancrm18-Apr-08 23:00 
GeneralRe: PerformanceCounter Problem Pin
Anthony Mushrow19-Apr-08 2:12
professionalAnthony Mushrow19-Apr-08 2:12 
GeneralRe: PerformanceCounter Problem Pin
stancrm19-Apr-08 11:15
stancrm19-Apr-08 11:15 
QuestionHow to get TaskFlow output as XML file from DSL tool Pin
Maddie from Dartford18-Apr-08 18:32
Maddie from Dartford18-Apr-08 18:32 
Questionwindows service using C# read from SQL database Pin
Knowledgestudent18-Apr-08 12:09
Knowledgestudent18-Apr-08 12:09 
GeneralRe: windows service using C# read from SQL database Pin
PIEBALDconsult18-Apr-08 13:41
mvePIEBALDconsult18-Apr-08 13:41 

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.