简体   繁体   English

MapPoint 滞后于 C#

[英]MapPoint lags with C#

I have included MapPoint control object into my C# form.我已将 MapPoint 控件 object 包含在我的 C# 表单中。 Once I try to close the program mappoint seems to free for a bit and causes lag.一旦我尝试关闭程序,mappoint 似乎会释放一段时间并导致延迟。

I tried setting _mpMap.Saved = true;我尝试设置_mpMap.Saved = true; but no luck但没有运气

MapPoint can pause during startup and shutdown due to cache issues, garbage collection, etc.由于缓存问题、垃圾收集等,MapPoint 可能会在启动和关闭期间暂停。

Make sure all of your MapPoint references are clean .确保所有 MapPoint 引用都是干净的。 As soon as you've finished with an object, clear the reference.完成 object 后,请清除参考。 For good measure run the garbage collection at a suitable point if possible (eg. After an object intensive batch job).如果可能的话,最好在合适的点运行垃圾收集(例如,在 object 密集型批处理作业之后)。

Are you working with MapPoint application or the control?您使用的是 MapPoint 应用程序还是控件? Your question is ambiguous in this regard.你的问题在这方面是模棱两可的。 Either way, you should consider a using statement.无论哪种方式,您都应该考虑using语句。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM