Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory usage

Status
Not open for further replies.

xenomage

Programmer
Jun 27, 2001
98
SG
Hi all,

got a problem with an C++ application.

When the application first start off, it took up 22k of memory. After a day of running, it took up 32k of memory.

Any body got any answer why is that and what can i do to prevent the application from eating away my memory?

Cheers
xeno
 
theer are many kinds of memory leaks. Use STL or MFC autopointers, or ATL smart pointers(in case you use COM).

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
The application is too huge for me to change all the memory usage method. Is there any other way out?

Thanks.
xeno
 
>xenomage
1.
>The application is too huge
it means, this is impossible to track all memory leaks.
2.
>Is there any other way out?
the responce is no, see 1.

because the application is huge, you have no choice. All pointers (except no one, and including each one) should eb changed to autopoinetrs.

3. MFC has classes for memory leaks detecting. You can use them to detect memory leaks, but you still have to change all pointers to some kind of autopointers.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top