Subject: Yet more problems freeing memory To: djgpp AT sun DOT soe DOT clarkson DOT edu Date: Fri, 28 Apr 1995 15:52:51 +0100 (BST) From: "B.S.Runnacles" Dear all.. I wrote recently of a problem I was having freeing up the memory associated with a linked list. It transpires that go32 does not actually report the memory being returned to the heap. My problem is that my code is leaking memory somewhere, in that it progressively eats up more and more memory in the large number of iterations required, eventually running out of swap space. I think I've traced the leak to the linked list objects I use, can anyone spot what is wrong here: private: listnode *Current,*Root LinkedList::~LinkedList(void) { for(Current = Root; Current!=NULL; Current=Current->next) delete Current; } I've tried the code on a number of GNU platforms (Solaris, LINUX) all to the same effect. Is there any way I can profile the memory usage using gprof or some other tool? Any suggestions would be much appreciated Ben Runnacles Image, Speech and Intelligent Systems Group University of Southampton, UK.