A liberação automática do MKMapView não chama dealloc depois que o UIViewController é acionado

Eu tenho o seguinte código na classe A:

UIViewController *vc = [self viewControllerForItem:item];

onde o método viewControllerForItem no meu representante de aplicativo retorna um UIViewController com base no meu item, ou seja,

vc = [[[MyCustomViewController alloc] init] autorelease];

return vc;

Em seguida, empurro o controlador de exibição:

[self.navigationController pushViewController:vc animated:YES];

Este VC que estou tentando enviar é um MKMapView e inseri uma instrução de log no método dealloc para ver se está sendo chamado. No meu uso de memória, o crescimento está aumentando rapidamente.

No entanto, quando adiciono o seguinte código depois de pressionar o VC:

[vc release];

minha classe MKMapView chama o método dealloc.

Obviamente, essa seria uma solução simples se a classe MKMapView fosse a única classe retornada pelo meu representante de aplicativo (ou eu poderia apenas verificar se a classe do VC é minha classe MKMapView). No entanto, eu gostaria de resolver o problema raiz disso.

Por que o acordo não está sendo chamado se eu definir o lançamento automático no meu controlador de exibição?

Como é possível adicionar [vc release] ao controlador de exibição, mesmo que o autorelease seja usado nesse vc?

obrigado

Editar:

Aqui estão algumas informações adicionais. Eu tenho a classe viewControllerForItem no meu representante de aplicativo. Estou retornando o objeto liberado automaticamente para minha outra classe de gerente, onde pressiono o controlador de exibição. A contagem de retenção está sendo desarrumada quando eu devolvo um objeto liberado automaticamente e o empurro em alguma outra classe?

Este é o backtrace / callstack quando pressiono o VC e quando o didDissappear do mkmapview é chamado:

pushVC: (
0   NewHampshire                        0x00254cdf -[CustomViewController navigateToRowId:withLinkBehavior:animated:] + 2111
1   NewHampshire                        0x002534c9 -[CustomViewController webView:shouldStartLoadWithRequest:navigationType:] + 841
2   UIKit                               0x02caf288 -[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 318
3   UIKit                               0x02cb1854 -[UIWebViewWebViewDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 77
4   CoreFoundation                      0x05d0bd1d __invoking___ + 29
5   CoreFoundation                      0x05d0bc2a -[NSInvocation invoke] + 362
6   CoreFoundation                      0x05d0bdaa -[NSInvocation invokeWithTarget:] +     74
7   WebKit                              0x0a4d811d -[_WebSafeForwarder forwardInvocation:] + 157
8   CoreFoundation                      0x05d076da ___forwarding___ + 458
9   CoreFoundation                      0x05d074ee _CF_forwarding_prep_0 + 14
10  CoreFoundation                      0x05d0bd1d __invoking___ + 29
11  CoreFoundation                      0x05d0bc2a -[NSInvocation invoke] + 362
12  WebCore                             0x09533b29 _ZL20HandleDelegateSourcePv + 121
13  CoreFoundation                      0x05ca083f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
14  CoreFoundation                      0x05ca01cb __CFRunLoopDoSources0 + 235
15  CoreFoundation                      0x05cbd29e __CFRunLoopRun + 910
16  CoreFoundation                      0x05cbcac3 CFRunLoopRunSpecific + 467
17  CoreFoundation                      0x05cbc8db CFRunLoopRunInMode + 123
18  GraphicsServices                    0x059749e2 GSEventRunModal + 192
19  GraphicsServices                    0x05974809 GSEventRun + 104
20  UIKit                               0x02a6ed3b UIApplicationMain + 1225
21  NewHampshire                        0x000150dd main + 125
22  libdyld.dylib                       0x04fab70d start + 1
)

disappear: (
0   NewHampshire                        0x0014631d -[CustomAdvancedGPSMapViewController viewDidDisappear:] + 173
1   UIKit                               0x02b85bac -[UIViewController _setViewAppearState:isAnimating:] + 341
2   UIKit                               0x02b86328 -[UIViewController __viewDidDisappear:] + 150
3   UIKit                               0x02b86461 -[UIViewController _endAppearanceTransition:] + 306
4   UIKit                               0x02ba549a -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 738
5   UIKit                               0x02b9d403 __49-[UINavigationController _startCustomTransition:]_block_invoke + 206
6   UIKit                               0x03176740 -[_UIViewControllerTransitionContext completeTransition:] + 99
7   UIKit                               0x02a63454 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke105 + 680
8   UIKit                               0x02ad1005 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 306
9   UIKit                               0x02abac6c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
10  UIKit                               0x02abaf58 -[UIViewAnimationState animationDidStop:finished:] + 80
11  QuartzCore                          0x028b2a44 _ZN2CA5Layer23run_animation_callbacksEPv + 304
12  libdispatch.dylib                   0x04d194b0 _dispatch_client_callout + 14
13  libdispatch.dylib                   0x04d0775e _dispatch_main_queue_callback_4CF + 340
14  CoreFoundation                      0x05d7ca5e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
15  CoreFoundation                      0x05cbd6bb __CFRunLoopRun + 1963
16  CoreFoundation                      0x05cbcac3 CFRunLoopRunSpecific + 467
17  CoreFoundation                      0x05cbc8db CFRunLoopRunInMode + 123
18  GraphicsServices                    0x059749e2 GSEventRunModal + 192
19  GraphicsServices                    0x05974809 GSEventRun + 104
20  UIKit                               0x02a6ed3b UIApplicationMain + 1225
21  NewHampshire                        0x0001507d main + 125
22  libdyld.dylib                       0x04fab70d start + 1
)

Solução: Embora as respostas neste post não tenham fornecido a solução exata para o meu problema, Darren definitivamente me guiou na direção correta usando a ferramenta de instrumentos. Eu achei o culpado um objeto CABasicAnimation que não estava sendo lançado corretamente.

no método viewWillDisappear, adicionei o seguinte ao objeto CABasicAnimation:

self.rotationAnimation.delegate = nil;
self.rotationAnimation = nil; 

questionAnswers(2)

yourAnswerToTheQuestion