3 ms·
> essentially the thing you have to avoid is "new" which is sort of the heart of the language ... You can use placement-new syntax and ~Object() (direct call t
by zozbot123 8y ago
> essentially the thing you have to avoid is "new" which is sort of the heart of the language ...
You can use placement-new syntax and ~Object() (direct call to the destructor), together with malloc/free, or any other memory-allocation primitive, just like in C. You don't have to use the inbuilt new operator.
Still, C++ should be considered a near-legacy language these days. Rust (even in its no_std subset) is progressing rather quickly.