Garbage Collection on one object, C#

前端 未结 6 1153
时光说笑
时光说笑 2021-01-13 22:11

I need to dispose of an object so it can release everything it owns, but it doesn\'t implement the IDisposable so I can\'t use it in a using block. How can I make the garbag

6条回答
  •  既然无缘
    2021-01-13 22:44

    If the object goes out of scope and it have no external references it will be collected rather fast (likely on the next collection).

提交回复
热议问题