Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
HUGE MEMORY LEAK pinpointed!
rickg22:
w00t! Excellent!
Now... how do we interpret it? :P
rickg22:
Oh my, look at this.
==29618== 10,748,090 bytes in 774 blocks are indirectly lost in loss record 244 of 244
==29618== at 0x400591C: operator new[](unsigned) (vg_replace_malloc.c:195)
==29618== by 0x49D3584: FileLoader::operator()() (filemanager.cpp:47)
==29618== by 0x49D5727: BackgroundThread::Entry() (backgroundthread.h:153)
==29618== by 0x4286217: wxThreadInternal::PthreadStart(wxThread*) (in /usr/local/lib/libwx_gtk2u-2.8.so.0.1.1)
==29618== by 0x428628C: wxPthreadStart (in /usr/local/lib/libwx_gtk2u-2.8.so.0.1.1)
==29618== by 0x48E532FA: start_thread (in /lib/libpthread-2.6.so)
==29618== by 0x42CC993D: clone (in /lib/libc-2.6.so)
There's the culprit! According to the report, there is a new[] without delete[] in FileLoader::operator()().
Ah, there it is. Since it's multithreaded, it does NOT dispose the memory when the file's loaded successfully. But then it's the client which must do it, right? So that means code completion does NOT dispose the data once it's read... or does it? :(
Biplab:
--- Quote from: rickg22 on June 22, 2007, 04:43:30 am ---There's the culprit! According to the report, there is a new[] without delete[] in FileLoader::operator()().
--- End quote ---
Great Ricks. :)
I hope this report can be used to clean up memory leak to a great extent.
BTW, I forgot to mention that to generate this report, I opened CodeBlocks-unix.cbp file with about 5-6 files open in Editor. Then I allowed Code Completion plugin to parse the project. Then I closed the project and C::B.
rickg22:
I have a question.
There's a Delete( ) operation done.
But I can't find ANYWHERE the function "Delete" (with uppercase). Is that C++? because I'd only seen delete in lowercase. Now I'm confused :(
Biplab:
--- Quote from: rickg22 on June 22, 2007, 04:58:32 am ---There's a Delete( ) operation done.
--- End quote ---
I believe this is for thread deletion, not for deallocating memory. :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version