|
|
|
|
|
by stormbrew
4322 days ago
|
|
RAII is a form of automatic resource management, it's true. It is, however, a deterministic form of automatic resource management. This is not to say that the underlying allocator is necessarily deterministic, but you're making a false dilemma here by putting it in opposition to making decisions about custom allocators and pool allocators. You can use RAII with custom allocators. You can use RAII with memory pools. And that's where C++ really does shine. It's a niche that hasn't even really been attempted much, let alone that it's been surpassed in. |
|