Submitted Questions

  • Static Destructor

    Why we use static destructor? What is its scope and What is its implementation?

    • Nov 7th, 2011

    You cannot declare destructor as static.
    Destructors cannot be declared const, volatile, const volatile or static.

    Refer:
    http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr380.htm

    static ~Sample()
    {
    std::cout