News for hackers. Stuff that matters.
Re:Custom Deleters for C++ Smart Pointers by Kristine1975 on Thursday April 28, 2016 @10:41AM (#11589194)
Facebook's Folly library implements something similar: https://github.com/facebook/folly/blob/master/folly/ScopeGua...

It provides some macros to make it easier to use, e.g.

  SCOPE_EXIT {
    cleanup();
    more_cleanup();
    if (needs_even_more_cleanup)
      even_more_cleanup();
  };

There are no comments on this comment yet.