Resource Allocation Is Initialization

A CeePlusPlus idiom.

Rule to prefer cleaning things up in (deterministic) destructors instead of 'finally' blocks or just loose at the end of functions.

This is absolutely necessary in C++ to make code exception safe.


See also InitializationIsResourceAcquisition, ResourceAcquisitionIsInitialization, ResourceAcquisitionIsInvocation

CategoryIdiom


EditText of this page (last edited August 1, 2006) or FindPage with title or text search