I just got a new book :-)

More Exceptional C++, and I found a couple of nice rules that I want us to
adopt:

-----
Always perform unmanaged resource acquisition in the constructor body,
never in initializer lists.
-----

-----
Perform every explicit resource allocation (for example, new) in its
own code statement, which immidiately gives the new'd resource to a
manager object (for example, auto_ptr.)
-----

Both of these has to do with exception safety, and even if we do not
use exceptions yet, we should think about this now.


-- 
        Lgb

Reply via email to