Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Does VBA have a garbage collector?
I am starting to learn VB.NET. I know VB.NET has garbage collection so you
don't have to destroy the object in code. Does VBA have a form of garbage collection or is it best to destroy the object manually in code? -- Cheers, Ryan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Does VBA have a garbage collector?
Yes. Typically I'm sure it's fine, if not better, to let VB's garbage
collection destroy objects naturally when they are about to fall out of scope (eg procedure level objects as the procedure terminates). You will still need to destroy static or module level objects when done. Also there are certain scenarios that lead to circular references where a particular object will need to be released first (probably a rare scenario in VBA). Some prefer to explicitly destroy all objects but that's more a matter of style. Regards, Peter T "RyanH" wrote in message ... I am starting to learn VB.NET. I know VB.NET has garbage collection so you don't have to destroy the object in code. Does VBA have a form of garbage collection or is it best to destroy the object manually in code? -- Cheers, Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OPC Data Collector | Excel Programming | |||
Garbage collection in VBA | Excel Programming | |||
Excel opening w/ garbage | Excel Discussion (Misc queries) | |||
Deleting garbage | Excel Programming | |||
delete garbage from worksheet | Excel Programming |