I been trying to properly use malloc() / memset() functions to allocate memory and free() after I finish using it in my personal application and C/C++ projects but memory doesn't seem to be properly free and Im going crazy! xD
I currently doing test with a program that loads a text file, stores its content line by line into a temporary string array then finally copy each element in the string array (line string) to a structure array and put it on a Listbox.
After using malloc() / memset() I made sure I put a free() at the end so it's supposed to be free, but when I verify the program in Task Manager, every time I do the text file loading it consumes 4KB more, and more. The text file is 2KB so I guess the temporary Strings and the structure's memory is never freed.
If someone has a very good example on how to allocate and free memory after using it I will really appreciate it ^^ If I can implement this in my applications and projects they will be more effective and avoid memory leaks.
SeeYaa!