Re:Custom Deleters for C++ Smart Pointers
by leetNightshade on Thursday April 28, 2016 @12:59PM
(#11590278)
It sounds to me what you're trying to do is essentially what a Scope Guard is for. Here's a wiki on them: https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Scope_Guar... And here's a nice and clean implementation of one I've used recently: http://stackoverflow.com/a/28413370
[ Parent
| on HN ]
There are no comments on this comment yet.