Re: Misbehaving COM object?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I personally faced some problems - similar to the one you describe - with
com object myself some times ago.
myObject = nothing
- only releases the .Net pointer reference to this object - and does not
destroy it...
If you have a "poorly written" (memory leaking) com object - this does not
solve your problem.
After checking for a "dispose" method there have been these approaches in my
case:
- System.Runtime.InteropService­s.ReleaseComObject
and the other (yes I know - you should not do that way...)
- GC.Collect.....

Regards



"Borco" <rgmullen@xxxxxxxxx> schrieb im Newsbeitrag
news:1123875485.719125.87370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> We have a .NET project that makes pretty regular use of a COM object
> that appears to be misbehaving. Am I correct in understanding that
> setting a COM object to nothing should act the same way that it would
> have in VB6? By this I mean it is actually destroyed and not marked for
> GC. We have an object that is called in a polling routine and looks to
> be leaking 6-8K at a time and never being reclaimed even though it is
> set to nothing. Is this possible in .NET or do we just have a poorly
> written COM object?
>
> TIA
>


.