2 ms·
I don't think that self-destructing individual objects via 'smart-references' are a good idea, especially when you need to carry an allocator around (either in
by flohofwoe 2y ago
I don't think that self-destructing individual objects via 'smart-references' are a good idea, especially when you need to carry an allocator around (either in the object or in the smart-reference).
Destruction should be explicitly performed at a specific time and place, and not happen decentralized in some random location of the code when a reference goes out of scope (I realize that this dismisses the whole idea of RAII and destructors and garbage collection in general, but ¯\_(ツ)_/¯).