perf(ios): UIImage memory leaks (#9783)

This commit is contained in:
Igor Randjelovic
2022-02-18 23:55:14 +01:00
committed by Nathan Walker
parent f37b0160ed
commit 988f372788
6 changed files with 65 additions and 10 deletions

View File

@ -28,10 +28,16 @@ export abstract class ImageBase extends View implements ImageDefinition {
this.style.tintColor = value;
}
public disposeImageSource() {
// override in subclass
}
/**
* @internal
*/
public _createImageSourceFromSrc(value: string | ImageSource | ImageAsset): void {
this.disposeImageSource();
const originalValue = value;
const sync = this.loadMode === 'sync';
if (typeof value === 'string' || value instanceof String) {