Recycle TypedArrays in Fade and TransitionInflater
Test: Builds Change-Id: I91e214eafc87850dca6986af2054e5edca46e724
This commit is contained in:
@@ -103,6 +103,7 @@ public class Fade extends Visibility {
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Fade);
|
||||
int fadingMode = a.getInt(R.styleable.Fade_fadingMode, getMode());
|
||||
setMode(fadingMode);
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -276,9 +276,11 @@ public class TransitionInflater {
|
||||
transition.addTarget(clazz);
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
a.recycle();
|
||||
throw new RuntimeException("Could not create " + className, e);
|
||||
}
|
||||
}
|
||||
a.recycle();
|
||||
} else {
|
||||
throw new RuntimeException("Unknown scene name: " + parser.getName());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user