Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsEvaluator mResultCallback is growing and do not realease previous callbacks #39

Closed
clydzik opened this issue Aug 11, 2017 · 7 comments

Comments

@clydzik
Copy link

clydzik commented Aug 11, 2017

i realized that this list is holding results callbacks (probably for matching request/response interface) but as self is not maintained after finish (success or failure)
com.evgenii.jsevaluator.JsEvaluator#mResultCallbacks

the workaround is to use
jsEvaluator.getResultCallbacks().remove();

but this is not documented and a bit awkward

@evgenyneu
Copy link
Owner

That's a very good point! I will look at this. Pull request is welcome as well. 👍

@clydzik
Copy link
Author

clydzik commented Aug 12, 2017

Yep most cases listeners are small so this make not much harm. But with inner classes can produce bigger leaks. Any way good to hear. I m taking some vacations now... Will follow from September on this. Will contribute than if still valid. Thanks.

@evgenyneu
Copy link
Owner

That's good to know, thanks.

clydzik pushed a commit to clydzik/js-evaluator-for-android that referenced this issue Sep 4, 2017
@clydzik
Copy link
Author

clydzik commented Sep 5, 2017

i provided some proposal for change. please letm me know what you think.

@evgenyneu
Copy link
Owner

Thank you! I will have a look.

@evgenyneu
Copy link
Owner

Thanks @clydzik for fixing the issue.

@clydzik
Copy link
Author

clydzik commented Sep 11, 2017

np. @evgenyneu thanks for the library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants