I am compiling the source for the tsearch.cpp file as part of my Visual C++ project and I have detected memory leaks in it. The leaks come from the _tdelete method where it does an malloc for the nodestack pointer and there doesn't seem to be a corresponding free of the pointer. Later it does free the unchained pointer, but by then I believe there are cases where the nodestack pointer has been overwritten. Has anyone else run into this problem and is there a solution for it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am compiling the source for the tsearch.cpp file as part of my Visual C++ project and I have detected memory leaks in it. The leaks come from the _tdelete method where it does an malloc for the nodestack pointer and there doesn't seem to be a corresponding free of the pointer. Later it does free the unchained pointer, but by then I believe there are cases where the nodestack pointer has been overwritten. Has anyone else run into this problem and is there a solution for it?
Sorry, I hit the e key instead of the r key so memory came out memoey. :-)