In my application I parse some data and create Project objects. To have them in a list there is a pointer to the nextProject in each Project object expect the last. This is the code where I add new projects:

After each parsing run I call reset() the problem is that the memory used is not released. If I comment out the addProject method there are no issues with my memory. Someone can tell me what could cause the memory leak?

In this implementation you are "walking" through the list, releasing the predecessing element, as long as there is an element following. If the next element is NULL, the last element has been released and the loop breaks.

Last but not least you need to reset the pointer to the first element (also called "anchor" in the terms of data structures):

firstProject = NULL;

this ensures that addProject does not try to append an project to NULL.

Your while loop is incorrect. In the condition, you will access the previously deleted project. Furthermore, you do not delete the first project. You need a temp variable to remember the current pointer, iterate pProject to the next project and then delete the project pointed at by your temp variable.
–
Johannes S.Nov 20 '12 at 11:29