473,388 Members | 1,524 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,388 software developers and data experts.

Virtual Memory problem.

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
2 1959
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ronald | last post by:
Hi! As I ran in to errors like "Ran out of memory" and "Out of memory" I supposed my website might have memoryleaks. To trace a potential memory leak I isolated the IIS process and monitored the...
5
by: Ian | last post by:
I have and Access 97 DB that prints a report that has many pages, sometime about 800-1000 page, each page contains a colour picture along with text boxes. The pictures are displayed on the...
3
by: Gregor Wind | last post by:
Hello all, for my image processing application I need a large amount of virtual memory. I read, that it is normaly possible to get 2GB of virtual memory for each process and when you modify the...
2
by: david.sanderson | last post by:
Hi, Hopefully this is thecorrect group, its a bit C++ and a bit POSIX... Ive had a look in the archives, and Im a bit confused.... I have some classes in a shared library (a .so on a QNX...
6
by: zissop | last post by:
Hello I have a strange situation with my ASP.Net applications running on Windows 2003 Server x64. As soon as they get instantiated (a visitor hits a page). the virtual memory they allocate goes to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.