bad_alloc
- From: George <George@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Dec 2007 05:38:03 -0800
Hello everyone,
Please help to comment whether my following understanding is correct,
1. whether or not we are using auto_ptr to allocate new object on heap
(using new), there may be bad_alloc exceptions;
2. when we met with such exceptions, we catch it (bad_alloc) and try to
mininize the operation in catch handler block (since when bad_alloc occurs,
it means memory is running out, we can not do anything complex in handler).
Both are correct? Please feel free to correct me if I am wrong.
thanks in advance,
George
.
- Follow-Ups:
- Re: bad_alloc
- From: Abhishek Padmanabh
- Re: bad_alloc
- From: Alex Blekhman
- Re: bad_alloc
- Prev by Date: Re: RAII (Resource Acquisition Is Initialization) pattern limitati
- Next by Date: Re: bad_alloc
- Previous by thread: Retrive Physical Media details associated with Logical Drive
- Next by thread: Re: bad_alloc
- Index(es):
Relevant Pages
|