• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can I somehow encourage the deallocation of a dismissed view controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I somehow encourage the deallocation of a dismissed view controller?


  • Subject: Re: Can I somehow encourage the deallocation of a dismissed view controller?
  • From: Conrad Shultz <email@hidden>
  • Date: Wed, 08 Feb 2012 16:46:52 -0800

On 2/8/12 4:23 PM, G S wrote:
> Hi all.
>
> Our app is crashing on the deallocation of a custom control, which resides
> on a view that's pushed onto the navigation controller's stack.
>
> The problem is that this view is almost never deallocated, even long after
> the user dismisses it with the Back button.  It's not a leak, so I guess
> the OS just keeps it around for future use.  However, it is deallocated at
> unpredictable times, and crashes every time.
>
> Does anyone know why these things linger so long after being dismissed?  I
> can't just deallocate it, because that isn't safe and not a valid test
> anyway.

This doesn't make sense to me.

Even *if* deallocation occurs later, that shouldn't cause a crash.
(Note that autorelease pools, for example, deallocate objects "later.")

This sounds more like, e.g., you have a delegate that is getting
deallocated first and your control is trying to send a delegate message
to garbage.  Or maybe you have something outside your view hierarchy
which is holding a non-zeroing weak reference to the control, sending it
a message after deallocation.

You didn't specify what sort of crash you are getting.  That would be
helpful here.

--
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Can I somehow encourage the deallocation of a dismissed view controller?
      • From: G S <email@hidden>
References: 
 >Can I somehow encourage the deallocation of a dismissed view controller? (From: G S <email@hidden>)

  • Prev by Date: Can I somehow encourage the deallocation of a dismissed view controller?
  • Next by Date: Re: Can I somehow encourage the deallocation of a dismissed view controller?
  • Previous by thread: Can I somehow encourage the deallocation of a dismissed view controller?
  • Next by thread: Re: Can I somehow encourage the deallocation of a dismissed view controller?
  • Index(es):
    • Date
    • Thread