Dear all
After recent bug reports ([1] and [2]) I had a look on the memory leak associated with the usage of share_string. share_string occupies some memory, but it apparently can afterwards never be released. Individual leaks are small, but there are many and the total memory leaked my quickly sum up. I have been studying the code, but I'm not able to figure out how ptr_shared works.
So I was wondering if someone could explain how ptr_shared works and if this explanation could be added to the source code in doxygen comments (and even the wiki?). Related to this question, why do we need a shared pointer system at all?
To solve the memory leak issue, I was thinking of replacing all calls to share_string with the usage of Glib::ustring (either directly or via ptr_shared). Is this a good idea or are there better options.
Thanks for the suggestions.
Regards K.
Links: [1] https://bugs.launchpad.net/inkscape/+bug/1043571 [2] https://bugs.launchpad.net/inkscape/+bug/1061967