-
Notifications
You must be signed in to change notification settings - Fork 121
Retain class observers #101
base: master
Are you sure you want to change the base?
Conversation
Bump @PaulTaykalo |
@zintus In case if we'll do this, no instance will be ever released, and everything will be in memory. |
This reverts commit 52d374c.
Your point is perfectly valid, it's not viable solution for big projects. I've investigated further and did find that unsubscription fails for objects changing their class after initialization. Realm doing this, so disable notifying objects with |
@PaulTaykalo gentle bump :) |
Sorry, @zintus I missed your commit. Also, for next releases, I think it's better to allow user to select what objects he want to be injected. |
It's good to have a project with libraries installed to check how it's working and check if it's failing or not |
Observers are referenced as __unsafe_unretained, but sometimes observers released, leading to crash on notification. Fix this by retaining observers.
Other approach may be keeping week references to observers, but i've took simple way :)