Memory Leak - Drawing.UnsafeNativeMethods/ComStreamFromDataStream

B

Bill Green

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)
 
K

Kevin Spencer

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.
 
B

Bill Green

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top