471,357 Members | 1,205 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,357 software developers and data experts.

Marshal.ReleaseComObject not releasing a COM from memory

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!

Jul 21 '05 #1
5 3884

"ahmadzia673" <ah*********@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
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.
Jul 21 '05 #2
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
"Willy Denoyette [MVP]" wrote:

"ahmadzia673" <ah*********@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
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.

Jul 22 '05 #3
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.

"ahmadzia673" <ah*********@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.com...
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
"Willy Denoyette [MVP]" wrote:

"ahmadzia673" <ah*********@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
>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.

Jul 22 '05 #4
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
"Willy Denoyette [MVP]" wrote:
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.

"ahmadzia673" <ah*********@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.com...
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
"Willy Denoyette [MVP]" wrote:

"ahmadzia673" <ah*********@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
>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.


Jul 22 '05 #5
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

"ahmadzia673" wrote:
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
"Willy Denoyette [MVP]" wrote:
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.

"ahmadzia673" <ah*********@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.com...
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
"Willy Denoyette [MVP]" wrote:

>
> "ahmadzia673" <ah*********@discussions.microsoft.com> wrote in message
> news:32**********************************@microsof t.com...
> >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.
>
>
>


Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by lebo | last post: by
7 posts views Thread by trialproduct2004 | last post: by
2 posts views Thread by Elton Rabello | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.