Long-standing error in exception handling by pool_allocator (contains untested patch)

Paolo Carlini pcarlini@suse.de
Sat Oct 9 21:42:00 GMT 2004


Joachim Kuebart wrote:

>>2- I think we should catch only std::bad_alloc, not all the possible 
>>exceptions.
>>    
>>
>This should work and might be correct, however it seems to me that the rest
>of the library uses catch (...) throughout. I wonder why?
>
Yes, I also wonder why... ;) I mean: in some places we *really* want to 
catch
everything (e.g., istream, ostream); in other places, we are actually 
*just* dealing
with std::bad_alloc, in order to avoid memory leaks. Probably, we should 
think
more about the latter... anyway, I agree that this is an unrelated issue...

Paolo.



More information about the Libstdc++ mailing list