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

StrictMode: A resource was acquired at attached stack trace but never released #27

Open
itzikBraun opened this issue Nov 29, 2016 · 1 comment

Comments

@itzikBraun
Copy link

itzikBraun commented Nov 29, 2016

RSBlur creates 4 Objects(2 Allocation, RenderScript and ScriptIntrinsicBlur) but it only destroys the RenderScript. This causes the resources to stick around and never get released. Calling destroy on all of those object in the finally clause fixes the issue.

I will try to find the time to make a PR.

Tested on a Nexus 6

@RosesJack
Copy link

I try to use RenderScript,and I know somthing about it now, I hope it can help you, RSBlur creates 4 Objects(2 Allocation, RenderScript and ScriptIntrinsicBlur) ,RenderScript only have one in a application,because class RenderScript have a static ArrayList<> to save RenderScript‘s Object, the Object is not released when you call destroy() ,they just call native function like c or c++, and you do not need to destroy the Object ,however ,you can call releaseAllContexts() to clear the List which save RenderScrit's Object if you want to destroy all RenderScript. then,Allocation,ScriptIntrinsicBlur,all they is used as Local variables ,their Object will be destroy by GC, and you should call destroy to use jni's function like RenderScript.

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