2 ms·
RAII doesn't necessarily mean avoiding new and delete. It just means cleaning up in destructors when you use new in the constructor or initialiser list or elsew
by 72deluxe 13y ago
RAII doesn't necessarily mean avoiding new and delete. It just means cleaning up in destructors when you use new in the constructor or initialiser list or elsewhere. In particular, RAII means grabbing what you need in the constructor rather than haphazardly creating items in member functions.
That's what I thought anyway?