Alexander Chemeris wrote: > Hello, > > On 2/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> Whenever I run this simple code with parameter false or true, I get lots >> of memory leaks shown by visual studio even in the newest code from >> sipxtapi branch. >> > Yeah... We know that there are memory leaks, but not all of them are easy > to remove. And at least I have no time to track them down. If you have good > patch to fix this memory leaks - you're more then welcome to post it to > tracker > and here, I'll look into. > > I greatly appreciate time you spending on sipXtapi. I believe people like you > help us make sipXtapi greatest library on Earth. > > BTW, I recommend you use better memory leak finder. E.g. I use > BoundsChecker. > > > That program visual leak detector 1.0 actually detected those leaks by chance. It's an old version and sometimes it detects leaks that don't exists. But in this case it was lucky, and when I followed the stacktraces I found out there are maybe 4~5 places in the library code that gets executed when you initialize and deinitialize sipxtapi and it creates dynamic singletons (i.e static member pointers to class created with new). These singletons aren't so easy to get rid of in a library as it might seem. I created a template helper class for getting rid of these singletons, but I read comments in the code and some of the singletons shouldn't be destroyed at all according to the authors.
When I have time I will try to get rid of the unnecessary singletons at least. But this singleton destruction will have to be carefully tested. Jaro _______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
