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

IT openings for Experienced candiates for Java / .NET

1 Answers  


Can you please explain the difference between value and reference types?

0 Answers  


How does vb.net achieve polymorphism?

0 Answers  


Explain about jagged arrarys ?

0 Answers  


How to store jpeg / gif / bmp image in database and how to retrieve them? The most stressful condition is database is distributed and stored images can be retrive from any computer in network and any one can store images from other computer!! plss help its urgent.......RAHUL RATHOD

3 Answers  


Explain the difference between import system.data.sqlclient and system.data.oledb?

0 Answers  


Explain about garbage collection?

0 Answers  


Why do we use ansi keyword?

0 Answers  


What are the two main parts of .net?

0 Answers  


What is difference between inline and code behind?

0 Answers  


Explain cts?

0 Answers  


Explain the difference between system.string and system.stringbuilder classes?

0 Answers  


Categories