Re: Removing Observers eats up memory
Re: Removing Observers eats up memory
- Subject: Re: Removing Observers eats up memory
- From: Markus Spoettl <email@hidden>
- Date: Mon, 25 Jan 2016 22:27:13 +0100
On 25/01/16 17:31, Gary L. Wade wrote:
You should look more at your design. Having that many objects being
unobserved and reobserved (your word although in the context of new objects)
reminds me of what I've called a genocidal refresh, an antipattern that can
be fixed by only refreshing (or in your case observing) the things actually
changed; in your case that may be only the items in the array that were added
or removed.
This no doubt would be the "right" way of doing it, but it would not address the
issue at hand because the observations have to be removed when the view
controller goes away (all of them at the same time), and that's where the
problem happens.
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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