4 ms·
RAII isn't a perfect safeguard against memory leaks. Rust doesn't provide 100% protection against them, either, especially when `unsafe` gets involved. It's bet
by sidlls 4y ago
RAII isn't a perfect safeguard against memory leaks. Rust doesn't provide 100% protection against them, either, especially when `unsafe` gets involved. It's better than C++, though, in this regard. There is no fool-proof way to avoid them, other than by never dynamically allocating memory.
- Shorel 4y agoIf everything is stack allocated, then the never dynamically allocating memory part will be true.