The Case For Do-Once
Lawrence D'Oliveiro
ldo at geek-central.gen.new_zealand
Mon Feb 8 16:40:33 EST 2010
In message <hkoje5$4nf$1 at lust.ihug.co.nz>, Lawrence D'Oliveiro wrote:
> The basic control flow is this:
> * Unconditionally initialize all dynamic storage to nil
> * Do the main body of the code, aborting in any error
> * Regardless of success or failure of the above, dispose of all
> allocated dynamic storage, using disposal calls which turn into
> noops if passed pointers that are already nil.
For more examples, see the spuhelper.c module here
<http://github.com/ldo/dvd_menu_animator>.
More information about the Python-list
mailing list