This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fix exception unsafety of __numpunt_cache


>... 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!

I think this will work too.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]