collection

  • Thread starter Thread starter iccsi
  • Start date Start date
I

iccsi

I declared a collection in my code like following

Dim MyCollection as Collection

Set MyCollection = new Collection


I just wonder should I set MyCollection in the end of program. Does MS
Access free those memory for collection.


Your help is great appreicated,
 
I declared a collection in my code like following

Dim MyCollection as Collection

Set MyCollection = new Collection

I just wonder should I set MyCollection in the end of program. Does MS
Access free those memory for collection.

Your help is great appreicated,

standard practice is to release/unset all pointer variables at the end
of your procedure...

set mycollection = nothing

which removes it from memory. Access doesn't handle releasing objects
when they go out of scope very well, so it's better to release
variable references for it.
 
standard practice is to release/unset all pointer variables at the end
of your procedure...

set mycollection = nothing

which removes it from memory.  Access doesn't handle releasing objects
when they go out of scope very well, so it's better to release
variable references for it.

Thanks millions for the message,
 
Back
Top