About constructors & Destructors

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.
 
O

Ot

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.
 
S

Snuyt

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
 
H

Herfried K. Wagner [MVP]

* "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.
 
A

Armin Zingler

H

Herfried K. Wagner [MVP]

* "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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top