473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 3982

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lebo | last post by:
Hi I'm trying to understand how Python handles memory usage and dynamic object loading and unloading. Problem to solve? Build a very low memory footprint (non-GUI) Python application for...
1
by: dhornyak | last post by:
I have been banging my head against the wall for a while now, and can't seem to id the problem. I've been through a ton of posts and the code doesn't seem any different. Can anybody see it? When...
7
by: trialproduct2004 | last post by:
Hi all I am having application in c# where i am loading one table of database into dataset. My table is of large size. so whenever i am loading that into dataset my memory size is getting...
2
by: Elton Rabello | last post by:
Hi I developed a component using 'Queue', it works fine at a Windows application, but i call it at the Asp .Net and return the error 'System.Runtime.InteropServices.COMException Can I use the...
5
by: ahmadzia673 | last post by:
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...
2
by: jason | last post by:
hello everyone, i have had a suppot ticket open with microsoft for some time to investigate a memory leak issue we are experiencing on our production web servers. the web servers host both ASP...
2
by: O.B. | last post by:
When using Marshal to copy data from a byte array to the structure below, only the first byte of the "other" array is getting copied from the original byte array. What do I need to specify to get...
0
by: xrxst32 | last post by:
Hello there, I have some doubts about the best practice for using COM automation, the Runtime Callable Wrapper (RCW) and Marshal.ReleaseComObject. So the question is/are: Do I need to release...
2
by: O.B. | last post by:
I have operation within a class that marshals the data into a byte array. Below are three different ways that work. Are there any downsides to using one over the the other? public virtual byte...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.