Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

static destructor?

Mar 14 2003 8:09 AM
I have an abstract class comprised solely of static methods and data members. I have implemented a static constructor to init the object upon the first call or use of any of its static members. There is one operation I need to perform upon destruction of the purely static object and nothing I've done seems to work. Implementing IDispose or writing a destructor don't work since there is never an instance of the object. I haven't found a static destructor either. Does anyone have any suggestions on how to execute code on the destruction of a purely static object? Is there such a thing as a static destructor?

Answers (1)