Ok, but how can I check to see if I deallocated the memory? Also wouldn’t typing MyTree =0; after delete MyTree; be pointless? It just looks like I’m defining a variable after I deleted MyTree.
Adding MyTree = 0; is just an additional (surplus?) protection. Just to make sure that if you (accidentally?) use the “MyTree” after it’s been deleted, you should get null pointer there (and then hopefully a clear error message).