Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Boost boost::weak_ptr

 

boost::weak_ptr is a Boost smart pointer class that 'stores a "weak reference" to an object that's already managed by a shared_ptr..' [1].

 

boost::weak_ptr can be used to obtain a read-only pointer from a boost::shared_ptr that detects if the original boost::shared_ptr still exists.

 

 

 

 

Examples

 

 

 

 

 

 

References

 

  1. Boost boost::weak_ptr documentation

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict