I have an method that intstantiates a COM object. I need it to be accessed
by only 1 thread at a time so I use a Mutex to enforce this. But it doesn't
look like the COM object is being released from memory when I'm done with it
before the next thread tries to instatiate it again. Is there a way to force
the COM object to be removed? Thanks.
Christian Fröschlin - 16 Sep 2004 13:48 GMT
> I have an method that intstantiates a COM object. I need it to be accessed
> by only 1 thread at a time so I use a Mutex to enforce this. But it doesn't
> look like the COM object is being released from memory when I'm done with it
> before the next thread tries to instatiate it again. Is there a way to force
> the COM object to be removed? Thanks.
Use Marshal.ReleaseCOMObject