{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/3009","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/3009/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/3009/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/3009/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/3009","id":100201048,"number":3009,"title":"18535358: Niling out the root view controller no longer cleans up the view controller hierarchy","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/classification:serious%20bug","name":"classification:serious bug","color":"e11d21"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:always","name":"reproducible:always","color":"5319e7"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:open","name":"status:open","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/4","html_url":"https://github.com/lionheart/openradar-mirror/milestones/iOS%20SDK","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/4/labels","id":1237418,"number":4,"title":"iOS SDK","description":null,"creator":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"open_issues":458,"closed_issues":0,"state":"open","created_at":"2015-08-03T02:08:31Z","updated_at":"2015-08-11T01:01:55Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-08-11T01:01:55Z","updated_at":"2015-08-11T01:01:55Z","closed_at":null,"body":"#### Description\n\nSummary:\r\nOn iOS 7, developers could nil out the application window's root view controller as a mechanism of tearing down the view controller hierarchy. Under iOS 8, this no longer holds true.\r\n\r\nIf a modal view controller is presented over the top of the root view controller, then niling out the root view controller has different behavior depending on whether or not the root view controller issues a request to dismiss all modals as part of the teardown procedure.\r\n\r\nThe two possible outcomes are:\r\n1) The view controllers within the view controller hierarchy will remain in resident application memory (i.e. not be deallocated). The associated views will remain on screen.\r\n2) The view controllers within the view controller hierarchy will be deallocated. However, the base view controller's view will remain on screen. This can result in the user interacting with elements within the view which message a deallocated view controller, and therefore crash the application.\r\n\r\nSample Project: https://www.dropbox.com/s/huthv18x132wz29/MemLeaks.zip?dl=0\r\n\r\nSteps to Reproduce:\r\nSee the attached sample project. Run the project on both iOS 7 and iOS 8 target devices.\r\n\r\nExpected Results:\r\nIn all cases, the expected behavior when the root view controller is set to nil is that:\r\n1) Any view controllers which were on screen are deallocated.\r\n2) The screen goes blank.\r\n\r\nActual Results:\r\nWhen a modal view controller is presented over the root view controller, the view controller hierarchy is not cleaned up properly. See the comments within the sample project for a more concrete explanation.\r\n\r\nVersion:\r\niOS 8.0\r\n\r\nNotes:\r\n\r\n\r\nConfiguration:\r\niPhone 5\r\n\r\nAttachments:\r\n'MemLeaks.zip' was successfully uploaded.\n\n-\nProduct Version: 8.0 (12A365)\nCreated: 2014-10-03T03:19:48.845653\nOriginated: 2014-10-02T20:17:00\nOpen Radar Link: http://www.openradar.me/18535358"}}