Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Open
@boutier

Description

@boutier
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.