C++ Language/Indirection/SmartPointers/CustomDestruction

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Normally you rely on a smart pointer to decide both "when" and "how" to deallocate. But it is possible for you to provide a custom callable-object for the "how" part.

Additional information about smart pointers using custom destruction (includes interactive examples)