473,398 Members | 2,113 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,398 software developers and data experts.

Memory Leak - Drawing.UnsafeNativeMethods/ComStreamFromDataStream

We have an aspnet application that all of a sudden starts building up
memory, I attached a debugger and other then the normal there was a ton of
the following. I am trying to narrow down where this is comming from. Were
using a few COM componets right now for minuplating images. Is the below
saying that it is comming from some code using the system.drawing class or
is it an interop to one of those components?

HANDLE(RefCnt):166f2090: sizeof(0ddd3514) = 2683456 (0x28f240) bytes
(System.Drawing.UnsafeNativeMethods/ComStreamFromDataStream)

--
Bill Green

Nov 18 '05 #1
2 1641
Unmanaged code is the most likely problem. However, there are a number of
classes in the System.Drawing NameSpace that have Dispose() methods which
should be called. When it is not called on classes such as Bitmap and
Graphics, it can cause a temporary buildup of extra memory which does
eventually get released.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Bill Green" <gr********@hotmail.com> wrote in message
news:#F**************@tk2msftngp13.phx.gbl...
We have an aspnet application that all of a sudden starts building up
memory, I attached a debugger and other then the normal there was a ton of
the following. I am trying to narrow down where this is comming from. Were using a few COM componets right now for minuplating images. Is the below
saying that it is comming from some code using the system.drawing class or
is it an interop to one of those components?

HANDLE(RefCnt):166f2090: sizeof(0ddd3514) = 2683456 (0x28f240) bytes
(System.Drawing.UnsafeNativeMethods/ComStreamFromDataStream)

--
Bill Green

Nov 18 '05 #2
It's strange though.. the problem doesn't do it all of the time.. It works
fine for an abritraty about of time and then all of a sudden it starts
building up memory very very quickly. We know that all operations of the
site are bing used so we can't pinpoint it to one area of the site or a
specific piece of code. It's an enterprise site running on three
webservers. But what you are describing seems that it would buildup from
the get go as soon as the aspnet_wp starts. but in our case it is steady at
about 200mb or so and then suddenly goes up to about 1.5 gb where then it
recycles. It could be working fine for 6 hours or 30 minutes before this
occurs. Thanks.

"Kevin Spencer" <ke***@takempis.com> wrote in message
news:uW**************@TK2MSFTNGP12.phx.gbl...
Unmanaged code is the most likely problem. However, there are a number of
classes in the System.Drawing NameSpace that have Dispose() methods which
should be called. When it is not called on classes such as Bitmap and
Graphics, it can cause a temporary buildup of extra memory which does
eventually get released.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Bill Green" <gr********@hotmail.com> wrote in message
news:#F**************@tk2msftngp13.phx.gbl...
We have an aspnet application that all of a sudden starts building up
memory, I attached a debugger and other then the normal there was a ton of the following. I am trying to narrow down where this is comming from.

Were
using a few COM componets right now for minuplating images. Is the below saying that it is comming from some code using the system.drawing class or is it an interop to one of those components?

HANDLE(RefCnt):166f2090: sizeof(0ddd3514) = 2683456 (0x28f240) bytes
(System.Drawing.UnsafeNativeMethods/ComStreamFromDataStream)

--
Bill Green


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: fremenusul | last post by:
I know I have been asking LOTS of xml questions and I really apprecaite all the help. Here is my XML file <?xml version="1.0" encoding="utf-8" ?> <products> <!-- Repeat the structure below...
8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
11
by: Pete Davis | last post by:
I have an app that's dealing with a few hundred bitmap thumbnails. I only instantiate the bitmaps that are visible at a given time and dispose of them if they get scrolled out of view. I've used...
2
by: Tyler Foreman | last post by:
Hello, I had an earlier post regarding a strange exception I (thought) I was getting in my windows form. I have since been able to trace the problem to a picturebox control on my form. I can...
0
by: Brian Keating | last post by:
hi there i've a test program that creates a treeview and destroys it over and over, i keep track of the gdi object count for the process and see if they are ok. However when i switch on...
3
by: Richard Lewis Haggard | last post by:
I'm using GetHicon to create a Cursor from a bitmap but I'm getting a memory leak when I do so. If I use DestroyIcon then memory leak goes away but the newly created Cursor is invalid. Is this a...
1
by: Dante | last post by:
I have encountered a memory leak in out application using .NET 2.0 while using our owner drawn controls. There are two instances I have found when checking the memory using .NET Memory Profiler...
3
by: frikk | last post by:
Hey everyone. I have been working with python for a couple years now, but just recently built my first program with a GUI. I decided to start with Tkinter since it is included with the base...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
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: 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
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...
0
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,...
0
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...

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.