Leif
I cant speak as an accomplished programmer, having only done simple
projects in C++
Still the code seems to be part of a routine. It looks like
cross_cursor is an object of class XCreateFontCursor
Maybe this is not being destroyed after use?
I havent the faintest how you would find the
Leif Asbrink wrote:
If I can assume that lost memory is reclaimed by the os at program
exit or at some suitable time afterwords (daily?) I can just forget
the whole issue:-)
A few KB at program strart or mode change is not a big problem. If you
are growing by 1KB per minute or something
There is (usually) a destructor
Richard,
Please note that X, like most Unix software that has been around for any
length of time, is written in C, not C++. Consequently, one often has to
explicitly call some sort of close() function to clean up resources rather
than relying on a destructor.
What is the meaning of lost memory ? Is it a part of
memory space that will eventually be swapped to disk?
Presumably there is no owner to it, will it just
accumulate until the next reboot ?
In valgrind's terminology, lost memory is synonymous with a memory
leak - memory which has been malloc'ed
Leif writes the code C and assembly so for Leif this means if he does a
malloc, calloc, realloc, etc. and if he then no longer needs the memory,
he must do a free on the no longer used memory.
Bob
Richard Hosking wrote:
Lost memory is allocated when an object in C++ is created , but not
mailinglist [mailto:[EMAIL PROTECTED] On Behalf Of
Robert McGwier
Sent: Tuesday, April 18, 2006 5:46 PM
To: Linrad mailinglist
Subject: [linrad] Re: Memory leakage.
Leif writes the code C and assembly so for Leif this means if he does a
malloc, calloc, realloc, etc. and if he then no longer needs the memory