Marshal.ReleaseComObject not releasing a COM from memory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a COM component in my ASP.Net application. When i try to release
it from memory by using Marshal.ReleaseComObject, its not working. The memory
is still leaks. What to do? Is there any other way to prevent from this
leakage?

Please help me!
 
ahmadzia673 said:
I am using a COM component in my ASP.Net application. When i try to release
it from memory by using Marshal.ReleaseComObject, its not working. The
memory
is still leaks. What to do? Is there any other way to prevent from this
leakage?

Please help me!

What memory do you think "leaks", how are you so sure about it, how do you
measure it?
What kind of COM object is this? If it's a VB6 or some other STA object, you
have to run asp.net in "aspcompat" mode.

Willy.
 
Hi Willy,
Thanks for your reply. I am using AdvIMAP4 component. My application is
running live. After about 12 to 15 days, an exception occurs when creating
its object as
Dim IMAP4 As AdvIMAP4.IMAP4
The exception is "Not enough memory is available to complete this operation".
The IMAP4 COM component is built in VC 6.0. Sorry, I dont know more than
this. I dont know whether it implements the IDisposable Interface or not.
I also tried to use Marshal.ReleaseComObject in a loop but still not working.
If i use every aspx page in aspcompat mode, will it work??

Thanks & Regards
Ahmad Zia
 
Classic COM objects require aspcompat to be set.
Don't know if it will help to solve the issue as I'm not sure it relates to
COM. No memory available could mean everything.

Willy.
 
Thanks Willy for the cooperation. I will now start the application in
aspcompat mode. Can you please tell me any tool that can help me in finding
out the memory leak.

Thanks
Ahmad Zia
 
Hi,
I ran the application in asp compat mode. It smoothly executed for 13 days.
But now today I have faced the same problem
"Not enough storage is available to complete this operation"
I am using the traditional COM component written in vc++ 6.
Can anyone help me please?

Ahmad Zia
 
Back
Top