473,382 Members | 1,726 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,382 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 3981

"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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.