S
steve
obj = nothing
but just as in vb6, this is automatically done for you when the object goes
out of scope. the only difference is how the garbage collection is done. vb6
decreases the reference count of the object and if the count is 0 then it
immediately tears down the object. vb.net may let the object linger in
memory for a while. it has an optimization algorythm. instead of slowing
your application down by mindlessly killing things off, it looks for the
most efficient time to do so. if that freaks you out, you can obj=nothing
and call gc.collect...vioala.
hth,
steve
| Hi,
|
| does anybody know how to replace the following statement (VB6) in VB.Net?
| Set obj = Nothing.
| I read something about implement IDisposable interface in each class
| I have, but I don't know how to use it.
|
|
but just as in vb6, this is automatically done for you when the object goes
out of scope. the only difference is how the garbage collection is done. vb6
decreases the reference count of the object and if the count is 0 then it
immediately tears down the object. vb.net may let the object linger in
memory for a while. it has an optimization algorythm. instead of slowing
your application down by mindlessly killing things off, it looks for the
most efficient time to do so. if that freaks you out, you can obj=nothing
and call gc.collect...vioala.
hth,
steve
| Hi,
|
| does anybody know how to replace the following statement (VB6) in VB.Net?
| Set obj = Nothing.
| I read something about implement IDisposable interface in each class
| I have, but I don't know how to use it.
|
|