471,348 Members | 1,428 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

Enumerate what was collected by the GC?

Hi, all:

I know it's strongly recommended against, but I believe my application runs
much more smoothly if I call GC.Collect() in a worker loop. If I omit the
call, I get an OutOfMemoryException from Graphics.DrawImage() halfway
through.

The loop in question is creating, resizing, and drawing a number of Bitmap
resources (which are unmanaged in C# but wrapped by a managed class). I
assume the exception stems from something I've somewhere neglected to
Dispose() of, but I really can't seem to locate it.

Are there any good trace or debug utilities for profiling the
behind-the-scenes activity of the GC? Maybe a way to track whose finalizers
are being called? I posted a few weeks back asking about a way to iterate
the referenced object list but heard no reply...

Thank you for any and all help.

/m

Jan 4 '06 #1
1 915
I use ".NET Memory Profiler" and it works great:
http://www.scitech.se/memprofiler/. We've used it to track down numerous
resource leaks in our applications.

--
Colin Neller
http://www.colinneller.com/blog
"mark r." <az******@obfuscate.yahoocom> wrote in message
news:47******************@tornado.rdc-kc.rr.com...
Hi, all:

I know it's strongly recommended against, but I believe my application
runs much more smoothly if I call GC.Collect() in a worker loop. If I omit
the call, I get an OutOfMemoryException from Graphics.DrawImage() halfway
through.

The loop in question is creating, resizing, and drawing a number of Bitmap
resources (which are unmanaged in C# but wrapped by a managed class). I
assume the exception stems from something I've somewhere neglected to
Dispose() of, but I really can't seem to locate it.

Are there any good trace or debug utilities for profiling the
behind-the-scenes activity of the GC? Maybe a way to track whose
finalizers are being called? I posted a few weeks back asking about a way
to iterate the referenced object list but heard no reply...

Thank you for any and all help.

/m

Jan 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by smichr | last post: by
6 posts views Thread by Gregory Petrosyan | last post: by
2 posts views Thread by eight02645999 | last post: by
8 posts views Thread by Dustan | last post: by
21 posts views Thread by James Stroud | last post: by

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.