.NET CLR 1.1 does not release the COM object reference.

J

johnxhc

We have a project in .NET 1.1 , some of the .NET methods take COM
interface reference pointer as a parameter, somehow we have to call
Marshal.ReleaseComObject to release the COM Object, otherwise the COM
object will never get release, Even we call gc.Collect()

But the same code compiles in .NET 2.0 works without the
Marshal.ReleaseComObject. (Unfortunately the project is supposed to
run on .NET 1.1.)

Is this a known problem? What is the remedy besides
Marshal.ReleaseComObject? (We know it is dangerous to call
Marshal.ReleaseComObject since we do not have total control of the COM
interface pointer )

Thanks in advance.
John
 

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

Top