How and when are c# Static members disposed?

后端 未结 4 1968
忘了有多久
忘了有多久 2020-12-08 19:11

I have a class with extensive static members, some of which keep references to managed and unmanaged objects.

For instance, the static constructor is called as soon

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-08 19:38

    You should dispose this objects manually, there is no way to create a "finalizer" for static resources.

提交回复
热议问题