[Patch] Fix exception unsafety of __numpunt_cache
Paolo Carlini
pcarlini@unitus.it
Mon Nov 24 12:23:00 GMT 2003
... I like *much* more the version below: we early set _M_allocated in
__numpunct_cache<_CharT>::_M_cache, in this way if any of the new
throws, then catched by __use_cache<>::operator(), the memory is
automatically freed by __numpunct_cache<>::~__numpunct_cache: very
clean!
Tested x86-linux.
Again, OK with you, Benjamin?
Paolo.
///////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_es_cache_alt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031124/dc1bf0b2/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_es_cache_alt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031124/dc1bf0b2/attachment-0001.ksh>
More information about the Libstdc++
mailing list