12.07.2015 Views

dangling pointer

dangling pointer

dangling pointer

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Handling HandlesCustom deleters can be used to manage things such as operating systemhandles and descriptors.// Win32 mutex handle managed by a boost::shared_ptr// A Win32 HANDLE is a void*boost::shared_ptr hMutex(::CreateMutex(NULL, TRUE, NULL),&CloseHandle);if(! hMutex){throw processKaputt;}

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

Saved successfully!

Ooh no, something went wrong!