12.07.2015 Views

dangling pointer

dangling pointer

dangling pointer

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Setting up Weak Pointer Relationsclass window {std::list m_children;boost::weak_ptr m_parent;public:void add_child() {boost::shared_ptr child(new window);m_children.push_back(child);child->m_parent = // need a shared_ptr to this }};boost::enable_shared_from_this saves.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!