Skip to content

fix(core): Provided image source gets unintentionally disposed#10654

Merged
NathanWalker merged 3 commits intoNativeScript:mainfrom
CatchABus:fix/img-source-cleanup-fix
Jan 13, 2025
Merged

fix(core): Provided image source gets unintentionally disposed#10654
NathanWalker merged 3 commits intoNativeScript:mainfrom
CatchABus:fix/img-source-cleanup-fix

Conversation

@CatchABus
Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

Image provided source has its native instance disposed during view disposal even when ImageSource instance is provided by developer.

What is the new behavior?

Image provided source does not have its native instance disposed during view disposal when ImageSource instance is provided by developer.
To avoid this, we wrap the native source inside a new ImageSource instance.

Developers will be responsible for cleaning up the image sources they provide just like it has always been for android.
Also, improved code readability for ImageSource.setNativeSource.

Fixes #9820 (revisited) #10625

@NathanWalker NathanWalker merged commit a883a79 into NativeScript:main Jan 13, 2025
@NathanWalker NathanWalker added this to the 8.9 milestone Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NS 8.2.0+ iOS Base64 images disappearing after scrolling ListView/RadListView

2 participants