Finalizing a COM object

Posted by Neverrav on Stack Overflow See other posts from Stack Overflow or by Neverrav
Published on 2010-05-31T15:49:34Z Indexed on 2010/05/31 15:53 UTC
Read the original article Hit count: 329

Filed under:
|
|

I'm trying to implement a singleton class, that holds a com object inside it. Class implements IDisposable interface, but when I try to implement a finalization method, I get an exception of access to com object from another thread.

This happens because clr uses a different thread when finalizes objects.

Is there any way to implement such a thing or maybe I just doing something wrong?

© Stack Overflow or respective owner

Related posts about c#

Related posts about com