Destroy COM object

J

Jenny

Hi all,

my ASP.NET page generates an COM object which is filled
with a lot of data (approx. 30 MB).
It is then stored in the Application-Collection to be
accessible for all users of the page.

Under some conditions I don't need this COM object anymore
and like it to be destroyed.
I'm using the following code to destroy this object:

Application.Lock()
Application.RemoveAll()
Application.Clear()
Application.UnLock()
GC.Collect()
GC.WaitForPendingFinalizers()

But the Private Memory Size increases instead of descreasing!!
Why???


Thanks in advance for all help!

Jenny
 
A

Alvin Bruney

Try setting the COM object to tell after all this. If this com object is
wrapped in some class you will need to call/implement dispose on it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top