Why Destructors in C++ can not be overloaded

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • landoori
    New Member
    • Mar 2008
    • 1

    Why Destructors in C++ can not be overloaded

    Hi All,

    Can any body tell that

    Why Destructors in C++ can not be overloaded
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    In what circumstance do you think you would need to be able to overload destructors?

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      An object that is going to be destroyed needs only one way of cleaning itself up.

      Note also that the destructor has no arguments and no return type to enforce that once it is called, the object is no longer useable.

      Comment

      Working...