View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
lexcel lexcel is offline
external usenet poster
 
Posts: 34
Default How to create a Delete method which frees memory occupied by my object

Hi Experts,

How do I create a Delete method which frees the memory which is
reserved (by means of the New keyword) for an object (of a home-made
class) ?

I am looking for the opposite of New.

Set MyObject = New MyClass ' - reserve memory for the object and give
me a pointer
MyObject.Delete ' - remove the object from memory and set pointer to
Nothing

To set the pointer to Nothing is the easy (and last) part.
Is there any instruction or function or API that removes the memory
occupied by an object?

I RTFM and STFW but couldn't find it.

Sincerely,

Lex