|
|
Subscribe / Log in / New account

Or You Could Simplify The Error-Recovery Paths

Or You Could Simplify The Error-Recovery Paths

Posted Dec 30, 2014 23:28 UTC (Tue) by cesarb (subscriber, #6266)
In reply to: Or You Could Simplify The Error-Recovery Paths by rleigh
Parent article: The "too small to fail" memory-allocation rule

Wouldn't it be more like a unique_ptr custom deleter instead of a shared_ptr custom deleter?


to post comments

Or You Could Simplify The Error-Recovery Paths

Posted Dec 31, 2014 11:17 UTC (Wed) by rleigh (guest, #14622) [Link]

Yes, either works for the example above (I originally wrote it to use shared_ptr but updated the example to use unique_ptr).


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds