Reply

Should I explicitly call a destructor on a local variable? (291 views)

0
    by: Jim Rey
Should I explicitly call a destructor on a local variable?


Replies

  • 0
        Replied by:  New User
    No. The destructor will get called again at the close } of the block in which the local was created.
    This is a guarantee of the language; it happens automagically; there's no way to stop it from
    happening. But you can get really bad results from calling a destructor on the same object a
    second time!