Hi again guys,
I have some more info - I decided to use boost's shared_ptr on my token objects, but still a memory leak (on unix) - here's the output from the memory tool with Valgrind:
14,659,544 bytes in 17 blocks are still reachable in loss record 19 of 19
==27212== at 0x4A19257...
I'm just using new and delete (where possible I always use the c++ functions / library) - I compile with -DNDEBUG and -O3, but I've tried changing the flags with no success.
As far as I know there are no platform specific pieces of code.
I do use inheritance on those "Token" objects that I was talking about - I use virtual destructors - in this program I actually only create derived objects, and thus delete the derived objects.
Sorry, I was a bit vague:
It's just a standard "console" application i.e. there's no gui stuff.
I recompile on unix using g++. I use mainly stl, but I do use the string class from boost.
The application is a speech recogniser - it works by passing thousands of "tokens" around a network - I'm...
Hi,
I have an app (C++) that runs on windows fine, and all memory appears to be released correctly (by observing the mem usage in Windows Task Manager).
When I run the same app on Unix / Linux, the memory does not release properly, and eventually goes on to the disk.
Is this a problem people...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.