[UWP] UWP导航内存泄漏 [英] [UWP]UWP Navigation Memory Leaks
问题描述
我已经尝试开发UWP App,但我发现内存泄漏有很多问题,从页面切换时使用简单的项目到其他页面使用visual studio诊断程序无法释放内存。其他用户有同样的问题吗?
用于重现我准备的示例项目的问题
http://www.fasthomestore.it/UWPNavigation.zip
编译,启动项目,启动visual studio诊断,等待30分钟,内存不断增加
您好,
请更改
NavigationCacheMode 从禁用到必需。这将确保应用程序每次导航时都不会创建页面的新实例。
喜欢这个:
this.NavigationCacheMode = NavigationCacheMode.Required;
祝你好运,
Roy
I have try to develop UWP App, but i have find many problems with memory leaks, using simple project when switch from page to other page the memory is not free using visual studio diagnostics. Other user have same problems?
for reproduce the problems i have prepared a sample project
http://www.fasthomestore.it/UWPNavigation.zip
Compile, start project, start visual studio diagnostic, wait 30 minutes, the memory increase continually
Hi,
Please change the NavigationCacheMode from Disabled to Required. This will ensure the app not create a new instance of the page every time when navigating to it.
Like this:
this.NavigationCacheMode = NavigationCacheMode.Required;
Best regards,
Roy
这篇关于[UWP] UWP导航内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!