Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Object construc...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 45840 of 48020
Post > Topic >>

Object construction...

by "barcaroller" <barcaroller@[EMAIL PROTECTED] > May 10, 2008 at 01:00 PM

At which point is an object considered to be completely constructed?

    X::X()
    {
        // constructor stuff

        throw "Exception"; // premature exit
    }

    X* x;

    try
    {
       x = new X;  // is 'x' a complete object?
    }
    catch (...)
    {
        delete x;  // is this valid?
    }


Is it only the throw() that determines if an object has been constructed
or 
not?
 




 3 Posts in Topic:
Object construction...
"barcaroller" &  2008-05-10 13:00:01 
Re: Object construction...
Andy Champ <no.way@[EM  2008-05-10 18:24:05 
Re: Object construction...
acehreli@[EMAIL PROTECTED  2008-05-10 17:38:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 8:46:48 CDT 2008.