4 ms·
I found custom deleters to be also useful for "conditional deletion", initialize it to point to a fixed size buffer on the stack, and dynamically allocate a lar
by byteware 5y ago
I found custom deleters to be also useful for "conditional deletion", initialize it to point to a fixed size buffer on the stack, and dynamically allocate a larger one if need be, the deleter can then check if it needs to deallocate