Jump to content

C++ Language/Indirection/SmartPointers/CustomDestruction

From Wikibooks, open books for an open world

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)