What is the relation between Garbage collector and finalize
and destructor?

Answers were Sorted based on User's Feedback



What is the relation between Garbage collector and finalize and destructor?..

Answer / kanak

GC checks for those resources which are no longer used by
the process. To release the memory from these resources and
in order to regain the memory heap GC initiates destructors
to destroy such instances of the program. Before the
destructor void an instance variable finalize routine gets
executed. This routine performs whatever is to be done
before the object return to void state or prior to release
of any unused resources.

Is This Answer Correct ?    6 Yes 2 No

What is the relation between Garbage collector and finalize and destructor?..

Answer / aparna

here the GC calls an object's FINALIZE metod immediately
befoer it collects an object that is no longer reffered by
the application
GC doesnt actually run finalize metod when the GC finds a
FINALIZE method it queues the obj up for the finalizer to
execute the objects metod

Is This Answer Correct ?    4 Yes 3 No

Post New Answer

More VB.NET Interview Questions

How to create Crystal Report in vb.net with coding

1 Answers   A3Logics, Ascent, TCS,


How do you script this scenario in QTP using VB? Verify XML attributes in XML message against XSD and data mapping of fields to Oracle tables? Verify data in XML to data in a defined table?

0 Answers   Perot Systems,


Explain about the feature anonymous type?

0 Answers  


How to store decimal data in .net?

0 Answers  


What are the different types of applications supported in .net (or) .net framework?

0 Answers  






What is the difference between a "jagged array" and multidimensional array" ?can anyone show me it practically ?

0 Answers  


Explain convert.tostring and i.tostring method?

0 Answers  


What does assert() method do In VB.NET

0 Answers   MCN Solutions,


what is difference between web.config and machine.config and where it will be ?

0 Answers  


when do we need a multiple document interface?

2 Answers  


What is normal jit?

0 Answers  


what is delegates

2 Answers  


Categories