Code Snippet for releasing a COM object

Code Snippet for releasing a COM object
May 16, 2006 Jens

After writing about Code Snippets, I thought it is time to publish one myself.

Description: It’s a Code Snippet for releasing a COM object. It first checks, if the object really is a COM object then releases it.
Shortcut: rco
Result: if ( (MyObject !=null) && (Marshal.IsComObject(MyObject)) )
{
Marshal.ReleaseComObject(MyObject);
}
Download: ReleaseComObject.snippet

Hello! I’m Jens. A User Experience Specialist and Developer based in Bonn, Germany.

0 Comments

Leave a reply

Your email address will not be published.

*