3 ms·
How memory safety is implemented? Is it even possible with a simple preprocessor tool?
by Panzerschrek 1y ago
How memory safety is implemented? Is it even possible with a simple preprocessor tool?
- KrishnaTorque 1y agoRight now there are 3 approaches. The "defer" will free memory when exit scope. Then there is a "try" macro which will handle IO. Then there is macro expansion which will ensure to compile safely. However there are a tons of things to do. It is still in alpha.
- Panzerschrek 1y agoI see no way "defer" may guarantee memory safety. And why is it needed at all in C++, where destructors do similar job of resources freeing?