I tried to send this a couple of times last week but it came back
I'll try again
Explain what
constructors and
destructors are, and describe their
use.
Briefly describe
how garbage collection works.
I
V
I
V
I
V
The
constructor is the
method that
initializes a class or structure and
is run when a the is
first instantiated.
It is used to
set defaults values and perform other tasks required by the class.
A d
estructor is the
method that is run as the object is being
reclaimed by garbage collection.
It contains any code that is requred for cleanup of the object.
The
garbage collector is a
thread that runs in the background of managed .Net applications.
It constantly
traces the
reference tree
and attempts to find
objects that are
no longer referenced.
When a nonreferenced object is found, its
memory is reclaimed for later use.