dangling pointer
dangling pointer
dangling pointer
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Pragmatism First (cont.)boost::shared_ptr sp(new X);// Get the raw <strong>pointer</strong>X* p = sp.get();Use boost::shared_ptr::get() only to pass the raw <strong>pointer</strong> tolibrary/system functions that expect a <strong>pointer</strong> and do not take ownership of the<strong>pointer</strong>.