Skip to content

Commit

Permalink
Destroy Allocation with ScriptIntrinsicLut
Browse files Browse the repository at this point in the history
Bug: 28053584

On destroying the intrinsic, destroy its contained Allocation right away.

Test: CTS on x86_64 emulator
Change-Id: I5ca0da33b620c3291b7cafda31a6cc83eb7461a0
  • Loading branch information
Yang Ni authored and Klozz committed May 23, 2017
1 parent bdb399a commit 453cec7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rs/java/android/renderscript/ScriptIntrinsicLUT.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public static ScriptIntrinsicLUT create(RenderScript rs, Element e) {

}

public void destroy() {
mTables.destroy();
super.destroy();
}

private void validate(int index, int value) {
if (index < 0 || index > 255) {
Expand Down

0 comments on commit 453cec7

Please sign in to comment.