So there can be only one destructor.
If I have declared in my class this for instance:
~Tvector(){delete[]m_values;}
there is no ~Tvector(){} anymore?
"Ivan Vecerina" <INVALID_use_webform_instead@vecerina.com> a écrit dans le
message de news: cunv54$591$1@news.hispeed.ch...[color=blue]
> "stephane" <stephane.vollet@bluewin.ch> wrote in message
> news:420f7d94$1_1@news.bluewin.ch...[color=green]
> > Is it possible to have several destructor in a same class?[/color]
> No - because the destructor is implictly called in most
> situations, and you wouldn't be able to specify which
> destructor to call.
>
> What is done instead is to:
> - Call explicitly a member function which will release
> resources or do any required specific operations.
> - Keep a flag or state variable in the object, which
> the destructor checks to know how it should behave.
> (this tends to be abused by novices, and is best avoided)
>
>
> --
>
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
> Brainbench MVP for C++ <>
http://www.brainbench.com
>
>[/color]