more-arw search

Q&A Forum

.NET force COM objects release

I have an .Net 2.0 application under IIS that has the functionnality of exporting some data to a software called HFM (Oracle Hyperion Financial Management). To perform that export, the .net application uses an API based on COM objects provided by the HFM client (the client is installed on the same machine that the server, etc.)

My problem is that the API provides a method to connect to the HFM server but not to disconnect. The documentation says that to disconnect, the application must call the method Marshal.ReleaseComObject() on each COM object created. But there are a lot of complex actions performed and I am not able to release all created object. So my application doesn't disconnect.

I've noticed that when I replace the .Net application dll files (which seems to reinit the objects instanciated by .NET), the application automatically disconnects.

I tried several times to call :

GC.Collect();
GC.WaitForPendingFinalizers();
But the problem remains. I'm looking for a way to be sure that ANY object created, even COM objects are released. I tried with Marshal.FinalReleaseComObject() but it's not better.

As I put a lock() on that section, there is always at most one user on that part so I can even use hardcore techniques to release the COM objects.

Is there a way to know which object or at least the type of the object that has not been released ?

Thanks for your help.

Answers

Len Green
Title: Performance Improvement Consultant and E..
Company: Haygarth Consulting LLC
LinkedIn Profile
(Performance Improvement Consultant and ERP Strategist, Haygarth Consulting LLC) |

I think your question is for people steeped in the technology, have you tried IT forums or the vendor support? Members here tend to be finance and accounting types, not IT developers.

326 views

Get Free Membership

By signing up, you will receive emails from Proformative regarding Proformative programs, events, community news and activity. You can withdraw your consent at any time. Contact Us.

Business Exchange

Browse the Business Exchange to find information, resources and peer reviews to help you select the right solution for your business.

Learn more

Contribute to Community

If you’re interested in learning more about contributing to your Proformative community, we have many ways for you to get involved. Please email content@proformative.com to learn more about becoming a speaker or contributing to the blogs/Q&A Forum.