开发者

Determine the number of instances of an object in memory?

开发者 https://www.devze.com 2023-02-12 15:34 出处:网络
开发者_如何学GoHow can I determine the number of instances of a specific object in memory in C#?

开发者_如何学GoHow can I determine the number of instances of a specific object in memory in C#?

Actually I want to call the garbage collector when the unreferenced instances of an object increases beyond a certain limit.


If you really want to do that you can use static field for the class( Infos )

And then in constructor you increase the static field.. It is just an idea..

0

精彩评论

暂无评论...
验证码 换一张
取 消