且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

托管C ++内存泄漏

更新时间:2023-02-12 12:21:22

首先是 LotActive 变量/字段(纯数据)或属性?

First, is LotActive a member variable/field (pure data) or a property?

我认为它是一个属性,在它可以设置之前,JIT必须编译代码设置器。在桌面.NET中,由JIT编译过程生成的本地代码不是垃圾收集,而是存在于AppDomain的生命周期中,因此它可能看起来像泄漏。

I think that it is a property, and before it can be set, the JIT has to compile the code for the setter. In desktop .NET, native code produced by the JIT compilation process is not garbage collected, instead it exists for the lifetime of the AppDomain, so it could look like a leak.

你可以检查每个调用这个函数是否泄漏另一个对象,或者泄漏只发生一次?

Can you check whether each call to this function leaks another object, or the leak just occurs once?