Rob Cameron wrote: > 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.
There is nothing for you to do because it's not a problem. The memory isn't really leaked. The memory gets allocated as your program is starting up, and it is used throughout the life of your program. That is, it's not something that gets allocated and then forgotten about. Furthermore, these "leaks" aren't repeated. They occur exactly once, no matter how long your program runs. And they don't grow. > 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? Those DLLs have nothing to do with the memory "leak" you're talking about. -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

