Memory

Ginanity

Newcomer
Joined
Nov 30, 2006
Messages
9
i'm not sure where to post this so ive put it in general.

Basicly i'm building a web developer (html/php editor with precodes etc) and i also wrote a debug system that automaticly catches errors etc. Now i was wondering if its possible to monitor the memory use of my application in orde to shut it down automaticly on memory leak? Is this even possible in .net and what library should i use?

thx in advantage,
Anti
 
An important point in the design of the DotNet framework is that memory leaks are very difficult to create. There are only two ways to create memory leaks that I know of. The first is to create objects and never release references to them (for instance, store them all in a List<T> object). The other is to use unmanaged code (ActiveX, P/Invoke, etc.) which already has a memory leak. Neither of these are generally a problem.

One should still make considerations when it comes to memory management, however. References to large objects should be released as soon as possible, and IDisposable objects should be disposed as soon as possible. Even if you neglect to follow these guidelines, though, you generally have to go out of your way to create a real memory leak.
 
An important point in the design of the DotNet framework is that memory leaks are very difficult to create. There are only two ways to create memory leaks that I know of. The first is to create objects and never release references to them (for instance, store them all in a List<T> object). The other is to use unmanaged code (ActiveX, P/Invoke, etc.) which already has a memory leak. Neither of these are generally a problem.

One should still make considerations when it comes to memory management, however. References to large objects should be released as soon as possible, and IDisposable objects should be disposed as soon as possible. Even if you neglect to follow these guidelines, though, you generally have to go out of your way to create a real memory leak.
ok i wasn't aware of this, thx.
But is it possible to get the amount of memory that is being used by the application?
 
Back
Top