Always call destroy on local render script object#194
Open
jpelgrim wants to merge 1 commit intowasabeef:mainfrom
Open
Always call destroy on local render script object#194jpelgrim wants to merge 1 commit intowasabeef:mainfrom
jpelgrim wants to merge 1 commit intowasabeef:mainfrom
Conversation
StrictMode reports that the local rs object leaks memory if it does not call destroy on the local reference. Always calling destroy() explicitly (when not null) fixes this memory leak.
E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'destroy' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:180)
at android.renderscript.Element.<init>(Element.java:1094)
at android.renderscript.Element.createPixel(Element.java:1265)
at android.renderscript.Element.RGBA_8888(Element.java:639)
at android.renderscript.Allocation.elementFromBitmap(Allocation.java:2762)
at android.renderscript.Allocation.typeFromBitmap(Allocation.java:2772)
at android.renderscript.Allocation.createFromBitmap(Allocation.java:2811)
at jp.wasabeef.glide.transformations.internal.RSBlur.blur(RSBlur.java:39)
at jp.wasabeef.glide.transformations.BlurTransformation.transform(BlurTransformation.java:79)
at jp.wasabeef.glide.transformations.BitmapTransformation.transform(BitmapTransformation.java:50)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
StrictModereports that the localrsobject leaks memory if it does not calldestroy()on the local reference. Always callingdestroy()explicitly (when not null) fixes this memory leak.