2 ms·
>I find memory management a pain without RAII, That statement is true. But, as you may be aware, it doesn't encompass quite a few use-cases. A lot of usecases
by ksk 13y ago
>I find memory management a pain without RAII,
That statement is true. But, as you may be aware, it doesn't encompass quite a few use-cases. A lot of usecases require you to have fine control over performance and using RAII will cause random speed-bumps. for e.g. when a ref-counted smart pointer(s) goes out of scope and triggers 'heavy' destructors on held objects to free up resources - at a non-deterministic time.