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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory issues

Status
Not open for further replies.

Nordlund

Programmer
Jul 17, 2001
458
SE
Hi ther.
What causes the application to use large amount of Virtual memory?

I have used Code Sleuth (Codewatch) to monitor my application. The Virtual memory seems to climb never reached heights.

This is critical thus this application shall be runned as a service in the near future.

I uses a lot of TStrings in this application, and I don't clear them before freeing them...



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.
 
Are you using a recursive function/procedure? That's what happened to me once.
 
I used classes derrived from TList. Don't ask me why I did that. This caused really serious memoryleaks.

I now use classes derived from TOjbect, and I have added a private TList som hold object. No more memoryleaks with this solution...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.
 
Nordlund,

one of the reasons of the having leaks in derived TList objects is that many people tend to forget to call the inherited methods when overriding ancestor methods...

--------------------------------------
What You See Is What You Get
 
Yeps, that must have been the case.

Thanks guys...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top