Skip to content

Profile Picture
Mobile
  • All
  • Search
  • Images
  • Videos
  • Maps
  • News
  • More
    • Shopping
    • Flights
    • Travel
    • Hotels
  • Tools
About 7,970,000 results
Open links in new tab
Any time
  1. stackoverflow.com
    https://stackoverflow.com › questions

    c++ - When do we need to define destructors? - Stack Overflow

    When you need to do this, you must define the destructor to be virtual within the base class. Otherwise, your derived destructors won't get called, independent of whether they are defined …

  2. stackoverflow.com
    https://stackoverflow.com › questions

    c# - How to call a destructor - Stack Overflow

    I know destructors are called by the garbage collector (GC) when objects are no longer used. But how can I call the destructor through C# code? If possible please give some basic example for

  3. stackoverflow.com
    https://stackoverflow.com › questions

    inheritance - Override Destructor C++ - Stack Overflow

    Jun 14, 2013 · If A's destructor was not virtual, then delete a would only call A's destructor, and you would end up with a memory leak. But because it's virtual, both destructors will be called, …

  4. stackoverflow.com
    https://stackoverflow.com › questions

    c# - When should I create a destructor? - Stack Overflow

    A destructor is then essentially an assurance that if the consumer of your object forgets to dispose it, the resource still gets cleaned up eventually. (Maybe.) If you make a destructor be …

  5. stackoverflow.com
    https://stackoverflow.com › questions

    What is the use of having destructor as private? - Stack Overflow

    Mar 10, 2009 · Basically, any time you want some other class to be responsible for the life cycle of your class' objects, or you have reason to prevent the destruction of an object, you can make …

  6. stackoverflow.com
    https://stackoverflow.com › questions

    C++ Constructor/Destructor inheritance - Stack Overflow

    For trivial cases that destructor just calls the base class' destructor, and often that means that there is no explicit code for its destructor (which imitates inheritance). But if a class has …

  7. stackoverflow.com
    https://stackoverflow.com › questions

    destructor - How do I correctly clean up a Python object ... - Stack ...

    May 15, 2009 · Specifically, I need Python to call the destructor for me, because otherwise the code becomes quickly unmanageable, and I will surely forget an exit-point where a call to …

  8. stackoverflow.com
    https://stackoverflow.com › questions

    c++ - When to use virtual destructors? - Stack Overflow

    Jan 20, 2009 · In most implementations, the call to the destructor will be resolved like any non-virtual code, meaning that the destructor of the base class will be called but not the one of the …

  9. stackoverflow.com
    https://stackoverflow.com › questions

    Does C++ call destructors for global and class static variables?

    Feb 5, 2010 · From my example program, it looks like it does call the destructors in both the cases. At what point does it call the destructors for global and class-static variables since they …

  10. stackoverflow.com
    https://stackoverflow.com › questions

    Difference between destructor, dispose and finalize method

    Dec 21, 2012 · I am confused over the use of Destructor, Dispose and Finalize methods. As per my research and understandings, having a Destructor method within my class will tell the …

  11. Pagination

    • 1
    • 2
    • 3
    • 4
    • Next
      © 2025 Microsoft
      • Privacy and Cookies
      • Legal
      • Advertise
      • About our ads
      • Help
      • Feedback
      • Consumer Health Privacy
      AllPast 24 hoursPast weekPast monthPast year