diff options
author | Yang Ni <yangni@google.com> | 2017-05-08 16:06:39 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-08 16:06:39 +0000 |
commit | fd9f0919956ab1cb41422f25ac00865214836d88 (patch) | |
tree | e5c6b2369d8e133d342b687bebae0526283b275a /rs/java/android/renderscript/Allocation.java | |
parent | fb18f4cfed00d25292445e6b561bcd0bf7ec64e1 (diff) | |
parent | a37bef769a19c8189612c8c956c374b231176739 (diff) |
Merge "Destroy Allocation right away on exception" am: 52bc790f61
am: a37bef769a
Change-Id: Id67163535eeaa36d1cd9edd34d19ed04858d62a2
Diffstat (limited to 'rs/java/android/renderscript/Allocation.java')
-rw-r--r-- | rs/java/android/renderscript/Allocation.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java index 05ad1615dc81..238bf0f5a335 100644 --- a/rs/java/android/renderscript/Allocation.java +++ b/rs/java/android/renderscript/Allocation.java @@ -2895,6 +2895,7 @@ public class Allocation extends BaseObj { mAllocationArray[0] = createTyped(rs, t, usage); if ((usage & USAGE_IO_INPUT) != 0) { if (numAlloc > MAX_NUMBER_IO_INPUT_ALLOC) { + mAllocationArray[0].destroy(); throw new RSIllegalArgumentException("Exceeds the max number of Allocations allowed: " + MAX_NUMBER_IO_INPUT_ALLOC); } |