Tags: #store #destructor
"The short answer is to store two raw pointers: one to the object, and one to a type-erased destructor function that’s handy to write using a lambda."
https://herbsutter.com/2016/09/25/to-store-a-destructor/
"The short answer is to store two raw pointers: one to the object, and one to a type-erased destructor function that’s handy to write using a lambda."
https://herbsutter.com/2016/09/25/to-store-a-destructor/
Sutter’s Mill
To store a destructor
[edited to add notes and apply Howard Hinnant’s de-escalation to static_cast] After my talk on Friday, a couple of people asked me how I was storing destructors in my gcpp library. Since seve…
Tags: #RAII #memory #destructor
We have RAII in C++ and therefore the totally deterministic destruction of objects. But, what is RAII? That's the topic of this post.
http://www.modernescpp.com/index.php/garbage-collectio-no-thanks
We have RAII in C++ and therefore the totally deterministic destruction of objects. But, what is RAII? That's the topic of this post.
http://www.modernescpp.com/index.php/garbage-collectio-no-thanks
Modernescpp
Garbage Collection - No Thanks - ModernesCpp.com