473,651 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Marshal.Release ComObject 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.Release ComObject, 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 3996

"ahmadzia67 3" <ah*********@di scussions.micro soft.com> wrote in message
news:32******** *************** ***********@mic rosoft.com...
I am using a COM component in my ASP.Net application. When i try to release
it from memory by using Marshal.Release ComObject, 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.Release ComObject 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:

"ahmadzia67 3" <ah*********@di scussions.micro soft.com> wrote in message
news:32******** *************** ***********@mic rosoft.com...
I am using a COM component in my ASP.Net application. When i try to release
it from memory by using Marshal.Release ComObject, 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.

"ahmadzia67 3" <ah*********@di scussions.micro soft.com> wrote in message
news:47******** *************** ***********@mic rosoft.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.Release ComObject 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:

"ahmadzia67 3" <ah*********@di scussions.micro soft.com> wrote in message
news:32******** *************** ***********@mic rosoft.com...
>I am using a COM component in my ASP.Net application. When i try to
>release
> it from memory by using Marshal.Release ComObject, 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.

"ahmadzia67 3" <ah*********@di scussions.micro soft.com> wrote in message
news:47******** *************** ***********@mic rosoft.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.Release ComObject 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:

"ahmadzia67 3" <ah*********@di scussions.micro soft.com> wrote in message
news:32******** *************** ***********@mic rosoft.com...
>I am using a COM component in my ASP.Net application. When i try to
>release
> it from memory by using Marshal.Release ComObject, 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

"ahmadzia67 3" 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.

"ahmadzia67 3" <ah*********@di scussions.micro soft.com> wrote in message
news:47******** *************** ***********@mic rosoft.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.Release ComObject 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:

>
> "ahmadzia67 3" <ah*********@di scussions.micro soft.com> wrote in message
> news:32******** *************** ***********@mic rosoft.com...
> >I am using a COM component in my ASP.Net application. When i try to
> >release
> > it from memory by using Marshal.Release ComObject, 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
3039
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 Unix/Windows. Why use Python? End user flexibility. So far it seems that (on Windows): (1) memory increases when you import <module>. Expected behaviour. (2) memory does not release when you del <module>. Why not? Is Python
1
4207
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 I call to GetTokenInformation I receive a buffer size (see //HERE... comment in code), but when I let the code continue, asp.net just sits there returning nothing, apparently on the Marshal.AllocHGlobal call. Here's the library function:
7
25966
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 increased. So what i want is as soon as i am setting dataset to null, memory should be released. But when i am looking into task manager for memory useage what i am
2
1551
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 Marshal object at Asp .Net? If not what can i do to do some background process I call at this way Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clic Dim Batch As BatchBR.IExport = Nothin
5
760
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 other way to prevent from this leakage? Please help me!
2
2000
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 classic and ASP.NET applications, and the leak is caused, at least in part, by the ASP.NET appliactions according to our support engineer. this is what he says: After a bit of research I was able to determine more on this stack. The
2
7198
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 Marshal.PtrToStructure to copy the all the data into the "other" array? unsafe public struct DeadReckoning {
0
2728
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 each COM object explicit by a call to Marshal.ReleaseComObject, does the RCW take care of that or does it leaks unmanaged resources?
2
15926
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 ToRaw1() { byte byteArray = new byte; IntPtr pointer = Marshal.AllocHGlobal(Size); Marshal.StructureToPtr(this, pointer, false); Marshal.Copy(pointer, byteArray, 0, Size);
0
8347
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8457
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8571
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.