更新时间:2023-02-13 10:08:45
从概要分析的角度来看,VSTO Add In与任何其他托管应用程序一样。在下面的两个线程中,将更详细地讨论内存泄漏。
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/647c803c-3cb9-4250-8641-ded48e4b158c/
http://social.msdn.microsoft .com /论坛/ zh-CN / vsto / thread / 7b2acfee-dd73-4b0c-9ddd-71248ec2dff8
您需要分析代码以查找可能的内存泄漏情况,请查看您的位置引用一个互操作对象(即使你通过VSTO对象模型得到它),你正在处理它并将引用设置为null。
你可能想要创建一个包装类来获取日历中常用的对象喜欢预约并妥善处理。
谢谢,iii Navneet
A VSTO Add In is just as any other managed application from the point of view of profiling. In below two threads memory leaks are discussed in more details.
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/647c803c-3cb9-4250-8641-ded48e4b158c/
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/7b2acfee-dd73-4b0c-9ddd-71248ec2dff8
You need to analyze your code for possible memory leak scenarios, see where ever you refer a interop object (even if you got it through VSTO object model) you are disposing it and setting the reference to null.
You may want to create a wrapper class which gets the frequently used objects in calendar like appointment and disposes them properly.
Thanks,
Navneet