Merge "Destroy Allocation right away on exception"
am: 52bc790f61
Change-Id: I2724dd4adf68aa8330b10b8f596d9d7db3619e03
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user