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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com