Re: What happens if an exception's thrown in a derived constructor?
From: Tom Widmer (tom_usenet_at_hotmail.com)
Date: 10/07/04
- Next message: Old Wolf: "Re: What happens if an exception's thrown in a derived constructor?"
- Previous message: ali: "Re: large value multiplication using stack - Help"
- In reply to: Ken Overton: "What happens if an exception's thrown in a derived constructor?"
- Next in thread: Old Wolf: "Re: What happens if an exception's thrown in a derived constructor?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 07 Oct 2004 16:52:47 +0100
On Thu, 07 Oct 2004 14:37:03 GMT, Ken Overton <ken.overton@gmail.com>
wrote:
>
>Is there still a base-class object hanging around that needs to be
>disposed-of? How do the resources allocated in the base class get
>destroyed?
Everything for which construction has already completed (e.g. members
and base classes if you're in the constructor body of the derived
class) gets its destructor called. Anything currently undergoing
construction (e.g. the derived class, the member being constructed if
applicable) doesn't get its destructor called. Memory for the class is
deallocated using the operator delete call that matches the operator
new called.
It's all pretty logical.
Tom
- Next message: Old Wolf: "Re: What happens if an exception's thrown in a derived constructor?"
- Previous message: ali: "Re: large value multiplication using stack - Help"
- In reply to: Ken Overton: "What happens if an exception's thrown in a derived constructor?"
- Next in thread: Old Wolf: "Re: What happens if an exception's thrown in a derived constructor?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|