4

I have noticed a memory leak when working with Template10. Easy to reproduce: 1. Create a new application based on the hamburger menu template project. Add no code. 2. Compile and run the app. 3. Switching from the main page to the detail page (and back) repeatedly will cause the memory used by the app to keep growing. 4. (optional) - I added calls to the following on the OnNavigatedTo handlers for all pages just to force Memory collection (it had no effect):

GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();

I have seen references to this problem elsewhere, but haven't found anything indicating what it's current status is. It was closed on this thread without explanation: https://github.com/Windows-XAML/Template10/issues/777

Some say it is the use of x:Bind, others the use of manually attached event handlers. On other threads, Microsoft has denied it is even a problem. Yet here it is.

Does anyone know if this is actively being addressed or what it's status is? Based on other threads, I'm not 100% sure it is a even template10 problem, but it is easy to reproduce with an out-of-the-box template10 project.

Dan
  • 83
  • 1
  • 1
  • 7
  • Update: I did find this link in the Template10 issues: https://github.com/Windows-XAML/Template10/issues/1403. It looks like what I am seeing, but I cannot confirm. Does anyone know the release schedule for template10 bits? – Dan Mar 18 '17 at 14:47
  • Unfortunately the Template10 release cycle is very hectic. I think only @Jerry Nixon can say any information about it. – Tóth Tibor Mar 18 '17 at 19:37
  • I have been able to confirm that this resolves the problem I was seeing. I copied the class file over to my project, renamed the class, and referenced my renamed class rather than the original. Problem is I also had to mangle some of the source code to get it to work at runtime. I would recompile the Template10 master branch myself, but it appears master isn't in a compilable state and I'm not in a position where I can upgrade to 2017 yet. @JerryNixon if you have any idea when the latest changes might be made available, I'd appreciate the info. – Dan Mar 18 '17 at 21:23
  • 1
    Yes this git repo is not maintained properly with the tags and the master branch is not the current release sadly... – Tóth Tibor Mar 18 '17 at 21:27
  • I partially resolved my problem by simply ripping the page header out and replacing it with a textblock and a spacer. However, there is still a fairly substantial leak going on. I suspect there are other subtle leaks at work. I have noticed pretty large memory footprint that continues to grow memory even with an empty app and no page header. – Dan Mar 27 '17 at 01:16

0 Answers0