About constructors & Destructors

  • Thread starter Thread starter ElanKathir
  • Start date Start date
E

ElanKathir

Hi All !

I want to know about the constructors & Destructors,

constructors ---> New
Destructors --> What ? (Which keyword to use for Destructor)

Thanks & Regards,
ElanKathir.S.N,
ASM Technologies,
B'lore.
 
dim athing = new thing

.... use athing as you will...

athing = nothing ' it goes away

Is that what you meant?

Hi All !

I want to know about the constructors & Destructors,

constructors ---> New
Destructors --> What ? (Which keyword to use for Destructor)

Thanks & Regards,
ElanKathir.S.N,
ASM Technologies,
B'lore.
 
ElanKathir said:
Hi All !

I want to know about the *constructors & Destructors,*

*constructors ---> New *
*Destructors --> What ? *(Which keyword to use for Destructor)

Thanks & Regards,
ElanKathir.S.N,
ASM Technologies,
B'lore.

I may be wrong, but I don't think VB.NET has any destructors. The
garbage collector does the job automatically.

Snuyt
 
* "ElanKathir said:
I want to know about the constructors & Destructors,

constructors ---> New

Destructors --> What ? (Which keyword to use for Destructor)

There is no deterministic desctruction in .NET. There are only
finalizers and the 'IDisposable' interface, you can implement.
 
* "Ot said:
athing = nothing   ' it goes away

This will only set a reference to 'Nothing', but the object previously
pointed to by 'athing' will be destroyed some times later by the GC.
 
Back
Top