Boost Shared Pointers and Memory Management

Posted by Izza on Stack Overflow See other posts from Stack Overflow or by Izza
Published on 2012-10-29T16:58:44Z Indexed on 2012/10/29 16:59 UTC
Read the original article Hit count: 158

Filed under:
|
|
|

I began using boost rather recently and am impressed by the functionality and APIs provided. In using boost::shared_ptr, when I check the program with Valgrind, I found a considerable number of "Still reachable" memory leaks. As per the documentation of Valgrind, these are not a problem. However, since I used to use the standard C++ library only, I always made sure that any program written is completely free from memory leaks. My question is, are these memory leaks something to worry about? I tried using reset(), however it only decrements the reference count, doesn't deallocate memory. Can I safely ignore these, or any way to forcibly deallocate the memory allocated by boost::shared_ptr?

Thank you.

© Stack Overflow or respective owner

Related posts about c++

Related posts about boost