I've written an app which will run continuously in the background on a 
server, so I am of course concerned about memory leaks.  I've used 
Memproof to check for leaks and it shows up two, both of which seem to 
originate in a call to function MakeObjectInstance in the unit 
classes.pas. One is a pointer allocated by GetMem (48 bytes) and one is 
a page allocation (4096 bytes) called by Virtual Alloc.   I can't see 
what, if anything I should change in my code to correct this.

After searching the web, I found a description of problems caused by 
this function:

http://www.thedelphimagazine.com/samples/1328/article.htm

and a short discussion here

http://www.cryer.co.uk/newsgroups/bp_delphi_rtl_win32/200506/050603372.htm

and

http://www.automatedqa.com/support/leaksd6.asp

which suggests a workaround - in my case it didn't seem to help.

Going back to Memproof, the only DLLs that seems to be loaded are 
user32.dll (for the pointer) and kernel32.dll (for both). 

Can I assume that these DLLs are only loaded once as the exe runs and if 
so does this mean that the leak is a one-off and doesn't accumulate?

If not, any advice?

TIA

Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to