3 ms·
> There simply is no silver bullet for memory management, you can either have high performance or automatic memory management, but not both. RAII is the way.
by bitwize 4y ago
> There simply is no silver bullet for memory management, you can either have high performance or automatic memory management, but not both.
RAII is the way.
- flohofwoe 4y agoRAII for memory management implies that destructors free owned memory, which can quickly cascade out of control for complex objects (e.g. you still need to think very carefully about memory management).
- gpderetta 4y agoYou are right in the sense that for high performance applications you still need to explicitly take into consideration memory allocations, allocators, indirection, into consideration. RAII helps you implement your preferred design, but it doesn't make you ignore the details.
- deleted 4y ago[deleted]