Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
HUGE MEMORY LEAK pinpointed!
Biplab:
Couple of Intel's tools are now free for Non-commercial use on Linux. Can anyone tell us whether Intel VTune Performance Analyser be used to detect Memory Leak or so? :)
rickg22:
--- Quote from: thomas on June 20, 2007, 05:22:15 pm --- it would be better to use the FileManager for loading, anyway.
--- End quote ---
Except this function is low level. The Todo plugin, for example, distinguishes between open files and in-disk files. File manager only opens one copy.... :o Oh, I get your point now.
So, should I change delete for delete[] in next SVN? er, I read the link. I'll do it tonight.
thomas:
Hmm... still 20.4 MB having Codeblocks.cbp open with no code completion enabled, and 105.4 with it. 8)
--- Quote from: rickg22 on June 20, 2007, 05:38:54 pm ---So, should I change delete for delete[] in next SVN? er, I read the link. I'll do it tonight.
--- End quote ---
Yes definitely, the other one is wrong and only works accidentially.
--- Quote from: rickg22 on June 20, 2007, 05:38:54 pm ---Except this function is low level. The Todo plugin, for example, distinguishes between open files and in-disk files.
--- End quote ---
The todo plugin should not really have to do with anything low level, I think. No component should, unless that's really necessary.
Some of the problems we have come from the fact that every component does its own low-level stuff, with filenames, strings, mangling arraystrings into strings and back, loading files, converting... adding a slash here, converting there, normalizing here but not there, pushing an event handler, tampering here and there, you get the idea.
Ideally, a plugin (or every other component) should be saying "ok, I am being told this is a path, I have no idea how it is encoded or what it corresponds to, now give me the data that belongs to this file, and no, I don't care how you do it".
You should not care whether a pathname is absolute or relative to your project directory or some subdirectory of it, or the root of your partition. The new file wizards *still* don't get this right (I've just had it fail again 5 minutes ago), and ProjectManager doesn't either, if the ScriptManager is involved. Ideally, they should all be saying "hey, I don't care... I have this 'thing' here, now you tell me what it is".
killerbot:
I hadn't seen this post but when I looked at the change I saw the leak was not fixed, so the delete [] has already been put there by me. ==> really fixed now ;-)
Grom:
malloc,free works faster then new delete[] :lol:
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version