use c++ and smart pointers. problem solved.
My advice is DON'T use C++. Avoid it whenever possible.use c++ and smart pointers. problem solved.
Completely agree 6502 . Sorry, eternal noob, most of what you say makes solid sense, but not this timeMy advice is DON'T use C++. Avoid it whenever possible.
only used smart pointers, that might not be too bad. Just don't use all the rest of the C++ gorp.Well, fair enough, fragmentation was probably the wrong word. Let's just say "your heap will slowly grow". I guess we haven't isolated the bug yet though. We don't know for certain where the memory leak is occurring, I was just guessing its a heap leak from the repeated free then malloc shown in the listing. Then again, no-one has answered my question yet, which is why does the hashtable need to use dynamic memory at all? But maybe the leak is happening somewhere else, it's not like we've seen all the code, so who knows.The question is not for embedded software. And memory leaks are not related to fragmentation.