Bug 30596 - UINavigationController retains controllers incorrectly
Summary: UINavigationController retains controllers incorrectly
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.10
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-29 13:56 UTC by John Miller [MSFT]
Modified: 2015-06-01 04:45 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Xamarin.iOS Test Case (24.91 KB, application/zip)
2015-05-29 13:56 UTC, John Miller [MSFT]
Details
Xcode Native Test Case (38.15 KB, application/zip)
2015-05-29 13:56 UTC, John Miller [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description John Miller [MSFT] 2015-05-29 13:56:43 UTC
Created attachment 11390 [details]
Xamarin.iOS Test Case

**Overview:**

   If I create an application with a single view (ViewController). This view has a button on it. The button when clicked takes you to a tab bar view (TabViewController). This tab bar view has two views (ViewControllerOne, ViewControllerTwo). If you go back from that tab bar view (via a navigation controller) there are still references to TabViewController, ViewControllerOne or ViewControllerTwo.

**Steps to Reproduce:**

   1. Run the attached project on a simulator. 
   2. Instruments can be used to see the Retain counts
   3. Press the button to navigate to the TabViewController, then press the Back button.
   4. Repeat steps 3 as much as you want, then look at the Retain counts. 

   Here is a screencast showing the Xamarin (TabTest) project and the native (TabTestNative) project. 
   http://screencast.com/t/ZewooxYKyl0v

**Actual Results:**
   
   There are still retains for the TabViewController and the two children of that TabViewController.
   See screencast. 

**Expected Results:**

   If you go back from that tab bar view (via a navigation controller) there should no longer be references to TabViewController, ViewControllerOne or ViewControllerTwo. There is nothing else, no outlets, actions etc in these view.

**Additional Information:**

   May be similar to #1889.
Comment 1 John Miller [MSFT] 2015-05-29 13:56:59 UTC
Created attachment 11391 [details]
Xcode Native Test Case
Comment 2 John Miller [MSFT] 2015-05-29 13:57:17 UTC
Included an Xcode project to compare via instruments.
Comment 3 John Miller [MSFT] 2015-05-29 16:41:04 UTC
Customer version info for this issue:

=== Xamarin Studio ===

Version 5.9.1 (build 3)
Installation UUID: 7cd1cc06-607e-4278-bbf4-381ff8bce70b
Runtime:
Mono 4.0.0 ((detached/d136b79)
GTK+ 2.24.23 (Raleigh theme)

Package version: 400000143

=== Apple Developer Tools ===

Xcode 6.3.1 (7703)
Build 6D1002

=== Xamarin.Mac ===

Not Installed

=== Xamarin.iOS ===

Version: 8.10.0.303 (Enterprise Edition)
Hash: 3c4e832
Branch: master
Build date: 2015-05-20 21:47:57-0400

=== Xamarin.Android ===

Version: 5.1.1.0 (Enterprise Edition)
Android SDK: /Users/david.ingham/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
Java SDK: /usr
No Java runtime present, requesting install.

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 509010003
Git revision: aad75a6e7e48f18120ce41f47d0ff2c6216f49c3
Build date: 2015-05-08 12:46:18-04
Xamarin addins: 1246b3044cbb7f56a217334f8fc5489ef8eefe3f

=== Operating System ===

Mac OS X 10.10.3
Darwin HSW10473.local 14.3.0 Darwin Kernel Version 14.3.0
Mon Mar 23 11:59:05 PDT 2015
Comment 4 David Ingham 2015-05-29 16:43:48 UTC
I was testing on a physical device. Using the simulator refused to show the
.net objects (viewcontrollers) in the collected data. Note sure why didn't have
time to get into that.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-06-01 04:45:53 UTC
I can reproduce with 8.10.0.303, but not with the upcoming 8.12 release, so it looks like we've fixed this.