By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,641 Members | 2,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,641 IT Pros & Developers. It's quick & easy.

Virtual Memory problem.

P: n/a
Hi,

Our application, seems to run fine for several hours, then pops up with a
low virtual memory message. This sometimes then crashes the system, since it
will then say one of the objects has not been instantiated.

I'm assuming we've been a bit lax with the disposing of objects. Is there a
difinitive list of things we should be disposing manually?

The application is graphic intensive and we have been disposing of variosu
graphic \ pens and brushes objects, but what about temporary bitmaps (i.e.
backbuffers) etc.

Any tips as to what else I might need to Dispose rather than let the GC have
a go at an unspecified point?

rollasoc
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You should call Dispose on every object that implements it. If an
object is finalizable, calling dispose will ensure it doesn't goto the
finalize queue, which will let the GC collect the memory sooner.

If calling Dispose doesn't fix the problem, look into profiling the
app.

-mike
MVP

"rollasoc" <ho*****@hotmail.com> wrote in message
news:uW**************@tk2msftngp13.phx.gbl...
Hi,

Our application, seems to run fine for several hours, then pops up with a low virtual memory message. This sometimes then crashes the system, since it will then say one of the objects has not been instantiated.

I'm assuming we've been a bit lax with the disposing of objects. Is there a difinitive list of things we should be disposing manually?

The application is graphic intensive and we have been disposing of variosu graphic \ pens and brushes objects, but what about temporary bitmaps (i.e. backbuffers) etc.

Any tips as to what else I might need to Dispose rather than let the GC have a go at an unspecified point?

rollasoc

Jul 19 '05 #2

P: n/a
Cheers Michael,

I've started disposing of things as I go and the problem hasn't been seen in
a couple of days (though I'm system testing it this afternoon, so we shall
see).

I've just downloaded a profiler as well, so will have a go with that.

rollasoc

"Michael Giagnocavo [MVP]" <mg*******@Atrevido.net> wrote in message
news:#P**************@TK2MSFTNGP12.phx.gbl...
You should call Dispose on every object that implements it. If an
object is finalizable, calling dispose will ensure it doesn't goto the
finalize queue, which will let the GC collect the memory sooner.

If calling Dispose doesn't fix the problem, look into profiling the
app.

-mike
MVP

"rollasoc" <ho*****@hotmail.com> wrote in message
news:uW**************@tk2msftngp13.phx.gbl...
Hi,

Our application, seems to run fine for several hours, then pops up

with a
low virtual memory message. This sometimes then crashes the system,

since it
will then say one of the objects has not been instantiated.

I'm assuming we've been a bit lax with the disposing of objects. Is

there a
difinitive list of things we should be disposing manually?

The application is graphic intensive and we have been disposing of

variosu
graphic \ pens and brushes objects, but what about temporary bitmaps

(i.e.
backbuffers) etc.

Any tips as to what else I might need to Dispose rather than let the

GC have
a go at an unspecified point?

rollasoc


Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.