Static Finalizer

后端 未结 5 899
无人共我
无人共我 2020-12-08 00:40

What is the right way to perform some static finallization?

There is no static destructor. The AppDomain.DomainUnload event is not raised in the defaul

5条回答
  •  自闭症患者
    2020-12-08 01:00

    I would question what you are loading in your static methods that need to be released. I certainly wouldn't recommend doing these things in a static method.

    That said, your static method could instanciate an object that has a finalise method.

提交回复
热议问题