Hah thanks heaps mate ! Sometimes I buy things to use them as fancy paperweights too P <| sep |> Yah if you think you can do that whole line in 15 minutes . <| sep |> You haven ' t given us the full source code so how can we be sure that you ' re properly deleting everything ? I think the bigger issue here is that you ' re trying to write C code in C , which uturtlecrk alludes to . Use smart pointers and nullptr instead of raw pointers and NULL . Also , it looks like you ' re trying to make a linked list of sorts ? Why ? Use stdlist if you REALLY need a linked list , but otherwise prefer stdvector . Always prefer the STL over your homebrew creations , unless you know what you are doing . Again , as uturtlecrk mentions , you ' re basically writing your own headaches and bugs . I don ' t see how using vectors would help here , bc I would still need to create new Entries and PathNodes ' Why does that stop you from using stdvector ? hint it doesn ' tFinally , please dont write Foo f new Foo unless you know the d i f f e r e n c e t h e p a r e n t h e s e s a f t e r t h e t y p e n amemakeadifferencewithnew and you know what you ' re doing . If you really , truly need to manually allocate memory , please explicitly call the constructor Foo f new Foo