June 04, 2008
Hello everyone,

Whenever i try to explicity delete a COM object (clases and interfaces inherited from IUnknown) i get compiler errors. How can i delete a COM object to free memory?

I create objects inside a loop, and so memory usage keeps growing as i can't delete objects or set them to null.
June 04, 2008
Heinz Wrote:

> Hello everyone,
> 
> Whenever i try to explicity delete a COM object (clases and interfaces inherited from IUnknown) i get compiler errors. How can i delete a COM object to free memory?
> 
> I create objects inside a loop, and so memory usage keeps growing as i can't delete objects or set them to null.

You don't delete COM objects - you call their Release() method.