473,231 Members | 2,008 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,231 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 941
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: smichr | last post by:
I see that there is a thread of a similar topic that was posted recently ( enumerate with a start index ) but thought I would start a new thread since what I am suggesting is a little different. ...
6
by: Gregory Petrosyan | last post by:
Hello! I have a question for the developer of enumerate(). Consider the following code: for x,y in coords(dots): print x, y When I want to iterate over enumerated sequence I expect this to...
2
by: eight02645999 | last post by:
hi, i am using python 2.1. Can i use the code below to simulate the enumerate() function in 2.3? If not, how to simulate in 2.1? thanks from __future__ import generators def...
8
by: Dustan | last post by:
Can I make enumerate(myObject) act differently? class A(object): def __getitem__(self, item): if item 0: return self.sequence elif item < 0: return self.sequence elif item == 0: raise...
21
by: James Stroud | last post by:
I think that it would be handy for enumerate to behave as such: def enumerate(itrbl, start=0, step=1): i = start for it in itrbl: yield (i, it) i += step This allows much more flexibility...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.