Open alxrMironov opened 1 month ago
The problem is that the pool returns simple pointers or references to an object.
It's possible that you could wrap the returned object in an etl::unique_ptr
with a custom deleter.
It may also be possible to add an additional member function that returns an etl::unique_ptr
.
Hello. The pool is pretty nice container in embedded systems. But there is an issue - it is incompatiable with RAII concept. (as far as i understand, i may be totally wrong).
It is nice to have a pool class, what generate some sort of pointer wrappers to objects, what can be deleted only by call the pool method. Or maybe even with integrated deleter.