mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
perf(ios): prevent crash with image release
This commit is contained in:
@@ -28,8 +28,10 @@ export class Image extends ImageBase {
|
|||||||
super.disposeNativeView();
|
super.disposeNativeView();
|
||||||
|
|
||||||
if (this.imageSource?.ios) {
|
if (this.imageSource?.ios) {
|
||||||
|
this.imageSource.ios = null;
|
||||||
|
// causes crash currently:
|
||||||
// release the native UIImage
|
// release the native UIImage
|
||||||
CFRelease(this.imageSource.ios);
|
// CFRelease(this.imageSource.ios);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.imageSource = null;
|
this.imageSource = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user