iphone - UIView Controller mysteriously getting deallocated -


I have a UI Navigation Scheme with a "Welcome" page, a mid page, and a description page.

In the middle page, there is a section controller that can swap the body part of that page between a table, a calendar and an Mkmap view, each with its own view controller classes is.

Today I applied MapView and its annotations and all this. This is good. And a detailed disclosure on each callout takes you to the details page, such as you find there through the table. Lovely.

I also have a right-button-bar button that pushes into the "Search" view. From there you can search the data you are navigating. When this data needs to be filtered (an array of objects that I keep in data singleton), this table reloads my data, and calls my annotation-spirit-end-builder methods on the map view, And then fashion herself, then the "middle" page (whatever she is seeing, was in the guts) returned to the screen.

The problem is, if I go further between the map and the search twice, due to any reason in the table view, we may get an accident from: *** - [CALayer retain] : The message has been sent to distributed frequency 0x710b810 . (I have explicitly NSZombies on.)

I put NSLog in the dealloc method of my table view controller. That thing is not being called anytime, I do not know if we are digging it behind the scenes for memory purposes, or if I'm leaking it and can not get back to my hands, or do I I see that there is any sign of loss on what?

Edit:

Here's the code where I swap the controllers of the main view of my "mid" view:

  - (IBAction Switch Switch: (ID) Sender {UISegmentedControl * seg = (UISegmentedControl *) Sender; NSInteger choice = [SEG selected SEgeIndex]; NSArray * array = [mainView SubViews]; UIView * Oldview = [Array ObjectAntIndex: 0]; [Remove oldviewprospectview]; If (like == 0) {if (! Self.tableController) self.tableController = [[events TableViewController alloc] initWithNibName: @ "Iventtebldrishy" bundle: nil]; [Add key view: view: self.tableController.view]; } If (choice == 1) {if (! Self.calendarController) self.calendarController = [[Iventsenderdrishy controller alloc] initWithNibName: @ "EventsCalendarView" bundle: nil]; [View Main Ad-Sequiewview: Self Calendar Controller See]; } If (choice == 2) {if (! Self.mapController) self.mapController = [[Iventmapdrishy controller alloc] initWithNibName: @ "Iventmapdrishy" bundle: nil]; [Add Main View Sweeview: self.mapController.view]; }}  

Below per ADAM, I am doing removeFromSuperview I tried to retain it in old Vee before it was removed, but with no help from this Not found

Thank you!

Are you using removeFromSuperview? Be aware, this removes from the supervision along with the release ...


Comments