Does Garbage Collection disposes a object even if you abort the application in the middle? How to check this?

Showing Answers 1 - 7 of 7 Answers

Koolster

  • Oct 30th, 2007
 

GC collects in a periodic fashion and clears only those objects which have been marked for deletion.

  Was this answer useful?  Yes

venubabu.ch

  • Oct 31st, 2007
 

No, GC doesn't clear when the application is aborted. As It run's on low priority thread and so if the application is aborted. The thread itself aborts.

  Was this answer useful?  Yes

Aldo John

  • Sep 5th, 2008
 

Garbage Collector runs as a seperate thread in the .NET runtime and not in the application we create. Even if the application crashes, GC will collect all the memory occupied by your program as there is no reference to those objects. To check if it is collected or not, you can try some CLR monitoring tools...like CLR Profiler...But its a hard job...most probably you will not need that..!!

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions