News for hackers. Stuff that matters.
Re:Mistakes to avoid with C++ 11 smart pointers by leni536 on Sunday May 15, 2016 @01:16AM (#11699549)
#11: Do not create two shared_ptr from the same raw ptr! It creates two control blocks and reference counts.
Re:Mistakes to avoid with C++ 11 smart pointers by danieldk on Sunday May 15, 2016 @01:17AM (#11699553)
That's #5.
Re:Mistakes to avoid with C++ 11 smart pointers by leni536 on Sunday May 15, 2016 @01:36AM (#11699597)
Oh, I missed that one.
Re:Mistakes to avoid with C++ 11 smart pointers by boulos on Sunday May 15, 2016 @01:52AM (#11699655)
Should have used a unique_ptr. ducks