cpp11training icon indicating copy to clipboard operation
cpp11training copied to clipboard

smart pointer presentation contains some antipatterns

Open xtofl opened this issue 5 years ago • 0 comments

Slide 15:


std::unique_ptr<derived> dp{static_cast<derived*>(bp.get())};
--> here, D is owned twice!
bp.release();

xtofl avatar Mar 17 '19 12:03 xtofl