Thursday, December 2, 2010

Scope Guard

Scope Guard - Acquire resources in a constructor and release them in destructor only when there is an exception.

Like RAII, except when there is no exception, the resources are not released.

Reference: http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms

No comments:

Post a Comment