A Pilgrim's Journal

recording discoveries along the pathway of life

Entries from March 2005.

13th March 2005
titus:

The C++ way to do this is to wrap access in a class. Put your initialization in the constructor, and the cleanup in the destructor, and then put an object of that class type on the stack.

C++ scope rules will take care of the rest, and it's exception safe.

Hope that helps,

Tags: advogato-old, c++.

RSS Feed

Created by Chronicle vUNRELEASED