Board index » cppbuilder » SelectDirectory and memory

SelectDirectory and memory


2005-03-31 05:07:00 PM
cppbuilder17
when i call SelectDirectory the first time it allocates about
2 MB of memory that it is never deallocated.
Does anyone know if it is possible to remove that memory allocation?
 
 

Re:SelectDirectory and memory

qyte wrote:
Quote
when i call SelectDirectory the first time it allocates about
2 MB of memory that it is never deallocated.

Does anyone know if it is possible to remove that memory allocation?
How did you determine that the memory was allocated?
If you used TaskManager then that is just showing what Borland's
memory manager has requested from Windows and won't go down until
the app shuts down.
Note that there are two memory managers used, one built into Windows
and the other which is part of the run time library of the application.
The RTL memory manager will request large chunks of memory from
Windows and will give it to the application in small chunks as and
when the app asks for it (with new/malloc etc.)
To determine if there really is a leak use memproof or other similar
memory leak checker.
HTH Pete