Content-Length: 242950 | pFad | http://github.com/NativeScript/NativeScript/issues/10625

5A Image disposal removes ImageSource content event when directly passed to the component. · Issue #10625 · NativeScript/NativeScript · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image disposal removes ImageSource content event when directly passed to the component. #10625

Open
3 tasks done
boutier opened this issue Sep 12, 2024 · 2 comments
Open
3 tasks done
Labels

Comments

@boutier
Copy link

boutier commented Sep 12, 2024

Issue Description

On iOS, I have an ImageSource that I want to pass to some Image components:

<Image *ngIf="cond" [src]="myImageSource"></Image>
<Image *ngIf="otherCond" [src]="myImageSource"></Image>

But when Image is disposed, it clears the content of the provided ImageSource (this.imageSource.ios = null; ), which makes it not reusable!

public disposeImageSource() {
if (this.nativeViewProtected?.image === this.imageSource?.ios) {
this.nativeViewProtected.image = null;
}
if (this.imageSource?.ios) {
this.imageSource.ios = null;
}
this.imageSource = null;
queueGC();
}

Note that when src is an ImageSource, the _createImageSourceFromSrc function does not create but just use the provided ImageSource

} else if (value instanceof ImageSource) {
// Support binding the imageSource trough the src property
this.imageSource = value;
this.isLoading = false;

Reproduction

No response

Relevant log output (if applicable)

No response

Environment

No response

Please accept these terms

@boutier boutier added the bug-pending-triage Reported bug, pending triage to confirm. label Sep 12, 2024
@CatchABus
Copy link
Contributor

Interesting. Does android behave as expected?

@CatchABus CatchABus added bug and removed bug-pending-triage Reported bug, pending triage to confirm. labels Nov 23, 2024
@boutier
Copy link
Author

boutier commented Dec 4, 2024

Yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/NativeScript/NativeScript/issues/10625

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy