Recently I wrote a template linked list class, iterator class, node class, etc. These are for use in a program that keeps track of meetings, and the participants in the meetings. The client program has a 2 lists: A list of objects of type meeting (Another class I wrote) and a list of pointers to objects of type person (Another class I wrote). The program keeps track of which "people" are invloved in which "meeting" by a private list in the meeting class. This list is called the "participants" list. This list contains pointers to the elements in the main "people" list. As I add/remove participants from meetings, the "participants" list is updated with pointers to the "people" list.
My programs are graded by an autograder software, and the only test that my program fails is the test of memory allocation, so I am led to believe there is a memory leak somewhere. My list class contains pop() and erase() functions that appear to work perfectly, and deallocate memory correctly. Thus, I think the problem lies in my client program. There, if I need to delete a person from the main "people" list, I must iterate through the list, find the person to delete, delete the pointer to the person, set the person* = NULL, and then finally remove the node from the list.
Does anything at all sound wrong with my logic?
Sorry for the long post...I was going to post code, but that would only icrease the length! If any code is needed, I can easily supply.