bing地图控件的内存问题 [英] Memory issue for bing map control
问题描述
在我的应用程序中,当从具有地图控件的页面导航时,内存使用率变高.有没有办法减少 bing 地图控件的内存使用量?
In my application the memory usage becomes high when navigating from a page having map control.Is there any way to reduce memory usage for bing map control?
推荐答案
我相信这样做的原因是在您导航回上一页后会保留对 Map 控件的引用.除了释放任何引用,我发现使用 SetMode 方法也有助于释放引用:-
I believe the reason for this is that a reference to the Map control is maintained after you navigate back to the previous page. In addition to freeing any references, I found that using the SetMode method also helps free up the references :-
map1.SetMode(new NullMode(), false);
我想我使用以下论坛帖子作为参考(前一段时间):-
I think I used the following forum post as a reference (it was a while ago) :-
http://forums.create.msdn.com/forums/p/65180/463528.aspx
就我而言,我不得不做一些额外的清理工作,并更改与使用触发器和取消注册 MVVM Light Messenger 相关的代码结构.
In my case I had to do some additional cleanup and change to code structure with relation to using triggers and unregistring the MVVM Light Messenger.
这篇关于bing地图控件的内存问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!