Table of Contents
Nowadays, every C++ developer is familiar with RAII technique. It binds resource acquisition and release to initialization and destruction of a variable that holds the resource. But there are times when writing a special class for such variable is not worth the effort.
This is when ScopeExit macro comes into play. You put resource acquisition directly in your code and next to it you write a code that releases the resource.
Last revised: July 08, 2010 at 22:36:27 GMT