Click here to Skip to main content
15,887,376 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Finalize method Pin
Rob Graham12-Dec-06 3:13
Rob Graham12-Dec-06 3:13 
GeneralRe: Finalize method Pin
rockyl12-Dec-06 3:44
rockyl12-Dec-06 3:44 
GeneralRe: Finalize method Pin
Rob Graham12-Dec-06 7:57
Rob Graham12-Dec-06 7:57 
GeneralRe: Finalize method Pin
rockyl12-Dec-06 17:12
rockyl12-Dec-06 17:12 
GeneralRe: Finalize method Pin
User 58385212-Dec-06 12:03
User 58385212-Dec-06 12:03 
AnswerRe: Finalize method Pin
Guffa13-Dec-06 2:59
Guffa13-Dec-06 2:59 
GeneralRe: Finalize method Pin
Scott Dorman13-Dec-06 3:42
professionalScott Dorman13-Dec-06 3:42 
AnswerRe: Finalize method Pin
Guffa13-Dec-06 3:09
Guffa13-Dec-06 3:09 
rockyl wrote:
I have got to know that when a finalizable object is unreachable then garbage collector removes its reference from finalizablr block and puts in freachable block and calls the finalize method and then frees the memory.


That will not happen. An object is not finalized when it's unreachable, it's just left untouched in memory until the next garbage collection.

If you want to free any resources, the class should implement IDisposable, so that you can call Dispose to tell the object that it won't be used any more.

At the garbage collection, if there is a finalizer in the class and GC.SuppressFinalize has not been called for the object, the object will be placed in the finalizing queue instead of being collected. A background thread is calling the finalizer for the objects in the queue, and after that the objects are up for collection.


---
It's amazing to see how much work some people will go through just to avoid a little bit of work.

GeneralRe: Finalize method Pin
Scott Dorman13-Dec-06 3:45
professionalScott Dorman13-Dec-06 3:45 
GeneralRe: Finalize method Pin
Guffa13-Dec-06 4:01
Guffa13-Dec-06 4:01 
GeneralRe: Finalize method Pin
Scott Dorman13-Dec-06 4:26
professionalScott Dorman13-Dec-06 4:26 
GeneralRe: Finalize method Pin
Guffa13-Dec-06 4:36
Guffa13-Dec-06 4:36 
GeneralRe: Finalize method Pin
karam chandrabose13-Dec-06 5:29
karam chandrabose13-Dec-06 5:29 
AnswerRe: Finalize method Pin
Guffa13-Dec-06 5:56
Guffa13-Dec-06 5:56 
QuestionImage Problem Pin
Tauseef A12-Dec-06 2:16
Tauseef A12-Dec-06 2:16 
AnswerRe: Image Problem Pin
Paul Conrad26-Dec-06 17:08
professionalPaul Conrad26-Dec-06 17:08 
QuestionWeb service Authentication Pin
Nithin Krishna12-Dec-06 0:28
Nithin Krishna12-Dec-06 0:28 
QuestionWither windows service? Pin
PhrankBooth11-Dec-06 16:05
PhrankBooth11-Dec-06 16:05 
QuestionVSTO for Outlook 2007 Pin
Felix Jongleur11-Dec-06 12:17
Felix Jongleur11-Dec-06 12:17 
QuestionVisual Studio Tools for Office version 2003 Pin
ocabrera7011-Dec-06 3:00
ocabrera7011-Dec-06 3:00 
QuestionModifying machine.config Pin
seanwright11-Dec-06 2:56
seanwright11-Dec-06 2:56 
AnswerRe: Modifying machine.config Pin
Pete O'Hanlon11-Dec-06 10:22
mvePete O'Hanlon11-Dec-06 10:22 
AnswerRe: Modifying machine.config Pin
Vasudevan Deepak Kumar12-Dec-06 3:22
Vasudevan Deepak Kumar12-Dec-06 3:22 
Questioncannot find one or more components.please reinstall the application Pin
MissionSuccess10-Dec-06 18:59
MissionSuccess10-Dec-06 18:59 
QuestionRe: System.Security.Cryptography.RSAParameters parameters Pin
edchan10-Dec-06 18:50
edchan10-Dec-06 18:50 

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.