dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]question about Finalize in C#


From: Ian Fung
Subject: [DotGNU]question about Finalize in C#
Date: Wed, 04 Sep 2002 15:59:33 -0400
User-agent: Microsoft-Entourage/10.0.0.1309

i asked this in the chan but no one was around. this isnt about developing
pnet or anything, but i ifigured someone would know the answer to this here
=).


C# Q: I understand what Finalize does. but from what i understand, it
         is not guarentteed to be called (ie only when the GC is called) and
         it also takes two calls to teh GC to retrieve the object. what kind
        of cleanup would you want to put in Finalize? i mean for example, if
          i open a file, wouldnt i want to close it outside of Finalize to
          make sure it closes everytime instead of putting it in Finalize?

also.

I know what a short weak reference is. what is a long weak reference?


thx,

-alias



reply via email to

[Prev in Thread] Current Thread [Next in Thread]