{"action":"created","issue":{"url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1242","repository_url":"https://api.github.com/repos/Windows-XAML/Template10","labels_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1242/labels{/name}","comments_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1242/comments","events_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1242/events","html_url":"https://github.com/Windows-XAML/Template10/issues/1242","id":179157894,"number":1242,"title":"Memory used during repeated page nav is never released?","user":{"login":"Chris-Marassovich","id":19677337,"avatar_url":"https://avatars.githubusercontent.com/u/19677337?v=3","gravatar_id":"","url":"https://api.github.com/users/Chris-Marassovich","html_url":"https://github.com/Chris-Marassovich","followers_url":"https://api.github.com/users/Chris-Marassovich/followers","following_url":"https://api.github.com/users/Chris-Marassovich/following{/other_user}","gists_url":"https://api.github.com/users/Chris-Marassovich/gists{/gist_id}","starred_url":"https://api.github.com/users/Chris-Marassovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chris-Marassovich/subscriptions","organizations_url":"https://api.github.com/users/Chris-Marassovich/orgs","repos_url":"https://api.github.com/users/Chris-Marassovich/repos","events_url":"https://api.github.com/users/Chris-Marassovich/events{/privacy}","received_events_url":"https://api.github.com/users/Chris-Marassovich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-26T07:32:51Z","updated_at":"2016-09-27T11:30:46Z","closed_at":null,"body":"Hello T10 team.\r\n\r\nI am nearing the end of my project using T10 and EF core and have been banging my head trying to resolve why my app just keeps using memory and never gives it back.  Where could I be leaking I keep asking myself?\r\n\r\nIn frustration I started a new project with just the default Hamburger template and the only change is in the MainPage.xaml.cs where I removed the line that enables the nav cache.  The doco states it is off be default.\r\n\r\nI run up the default app go between the detail page and back to main page many times over.\r\nAs you can see from the Diagnostic tools image it never releases any of that memory.\r\nThe user interaction in my app is similar in that they move between pages a lot and in my case each page requires a little more memory than the template.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/19677337/18826101/072984ac-840f-11e6-85a7-80c6cbcb0696.png)\r\n\r\n\r\nWhat am I doing wrong here?  I see the same behaviour with the default template and I have been over a lot of the samples and I am doing the same or no more than they are.\r\n\r\nHelp please I feel I am going crazy. :-)\r\n\r\nCheers\r\nChris ..."},"comment":{"url":"https://api.github.com/repos/Windows-XAML/Template10/issues/comments/249839066","html_url":"https://github.com/Windows-XAML/Template10/issues/1242#issuecomment-249839066","issue_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1242","id":249839066,"user":{"login":"TrevorBarstowTT","id":18306625,"avatar_url":"https://avatars.githubusercontent.com/u/18306625?v=3","gravatar_id":"","url":"https://api.github.com/users/TrevorBarstowTT","html_url":"https://github.com/TrevorBarstowTT","followers_url":"https://api.github.com/users/TrevorBarstowTT/followers","following_url":"https://api.github.com/users/TrevorBarstowTT/following{/other_user}","gists_url":"https://api.github.com/users/TrevorBarstowTT/gists{/gist_id}","starred_url":"https://api.github.com/users/TrevorBarstowTT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrevorBarstowTT/subscriptions","organizations_url":"https://api.github.com/users/TrevorBarstowTT/orgs","repos_url":"https://api.github.com/users/TrevorBarstowTT/repos","events_url":"https://api.github.com/users/TrevorBarstowTT/events{/privacy}","received_events_url":"https://api.github.com/users/TrevorBarstowTT/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T11:30:45Z","updated_at":"2016-09-27T11:30:45Z","body":"@Chris-Marassovich Clarification on destructor. I added the destructor to the main page and set a breakpoint on the constructor and destructor. That allows me to see when the page object is created and destroyed (during garbage collection). You don't need a destructor normally - it just helps debugging what is going on. \r\nI also added to SettingsPage \r\n        protected override void OnNavigatedTo(NavigationEventArgs e)\r\n        {\r\n            GC.Collect();\r\n            GC.WaitForPendingFinalizers();\r\n....\r\nso I can see if the main page destructor is called.\r\n"}}
{"actor":{"display_login":"TrevorBarstowTT"}}