Closed mradzinski closed 6 years ago
This should be fixed with upcoming 3.1.0 version. Please try 3.1.0-SNAPSHOT and let me know if that fixes this issue.
On So., 17. Sep. 2017, 01:34 Matias Radzinski notifications@github.com wrote:
I'm currently developing an app using Mosby 3.0.4 and LeakCanary once in a while tells me there's a 2 or 3 MB leak here https://github.com/sockeqwe/mosby/blob/e9462d1011b2acb3e3d6b6605fc17cc5496778c6/presentermanager/src/main/java/com/hannesdorfmann/mosby3/PresenterManager.java#L40 .
There aren't steps to reproduce it since it happens randomly (mostly upon closing the app), but it's not a constant and can't seem to find a reason why it might be leaking there.
Any ideas why this might be happening?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sockeqwe/mosby/issues/275, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrsfjwmMgAeFxGcWix9k2icQVxbh0ks5sjFrygaJpZM4PZ-4b .
I'm also using mosby-conductor. Will upgrading to 3.1.0 have any side effects? Just wondering if I'll need to update that one too.
It's not breaking anything (like crashing), but with Mosby Conductor the new internal changes introduced in 3.1.0 are not applied yet as it requires some Mosby conductor internal changes too. I can provide you a snapshot for Mosby conductor 3.1.0 on Monday.
On So., 17. Sep. 2017, 03:13 Matias Radzinski notifications@github.com wrote:
I'm also using mosby-conductor. Will upgrading to 3.1.0 have any side effects? Just wondering if I'll need to update that one too.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/sockeqwe/mosby/issues/275#issuecomment-330005451, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrhlUZhSAQ6yZaDiun---y_qtXWKKks5sjHI3gaJpZM4PZ-4b .
That would be absolutely fantastic. Just drop me a line here whenever you get some time to update mosby-conductor and I'll give both a try. Thanks mate!
Hm, I had an error in reasoning. PresenterManager shouldn't be used at all with conductor. Do you use multiple Activities and MviActivity or the like?
I do have more than one activity, but only one of them uses Mosby (the other one is just a Splash with no presenter, so nothing to do with this). No MVI activity.
When is 3.1.0 version released ? My app's leaked on PresenterManager
I hope this week. Mosby Conductor mist likely next week.
@sockeqwe the real problem is your Delegate classes Implementation can't recognized the view(for example fragment) is totally destroyed or it's destroyed just for orientation change. if they store anything like context in static field they get leak from LeakCanary but what about when you just don't need the presenter class anymore and it remained in PresenterManager? the presenter is not needed anymore. I think for fragment case you should check if onDestory called you should delete the presenter instance. and if developers want to get presenter from cache in case of orientation change they should setRetainInstance to true
In 3.1.0 it can distinguish between not being usee anymore and temporarily detached.
There are two things to note here:
Siavash A notifications@github.com schrieb am So., 12. Nov. 2017, 13:39:
@sockeqwe https://github.com/sockeqwe the real problem is your Delegate classes Implementation can't recognized the view(for example fragment) is totally destroyed or it's destroyed just for orientation change. if they store anything like context in static field they get leak from LeakCanary but what about when you just don't need the presenter class anymore and it remained in PresenterManager? the presenter is not needed anymore.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/sockeqwe/mosby/issues/275#issuecomment-343734345, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnroWw7oDnrwpYUIc3CgBq46JSYQ_aks5s1ubmgaJpZM4PZ-4b .
when it will be released? I didn't get any leak report from LeakCanary. I just checking the implementation and find out it can be leaked whether it report by Canary or not. So I decide to write an issue but I see there is already a thread about that.
@siavashabdoli which classes / code do you think can create a leak?
I'm currently developing an app using Mosby 3.0.4 and LeakCanary once in a while tells me there's a 2 or 3 MB leak here.
There aren't steps to reproduce it since it happens randomly (mostly upon closing the app), but it's not a constant and can't seem to find a reason why it might be leaking there.
Any ideas why this might be happening?