mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
perf(ios): UIImage memory leaks (#9783)
This commit is contained in:

committed by
Nathan Walker

parent
f37b0160ed
commit
988f372788
@ -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) {
|
||||
|
Reference in New Issue
Block a user