Can you declare a C++ type destructor in C# like ~MyClass()?
By in C# on Jul 14 2006
  • Akash Varshney
    Sep, 2015 29

    YES . but we should not use it generally ..

    • 0
  • Jul, 2006 14

    Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector. The only time the finalizer should be implemented, is when you’re dealing with unmanaged code.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS