Skip to content

[iOS] Investigate if MauiCALayer needs to use a weakreference for the IShape #26169

@PureWeen

Description

@PureWeen

Description

We should confirm this a bit more

		[UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "IShape is a non-NSObject in MAUI.")]
		IShape? _shape;

You might get some shapes that inherit from View and those will have Handlers and NSObjects associated with them

public sealed partial class RoundRectangle : Shape, IShape, IRoundRectangle

Reproduction

Haven't been ablet to reproduce as of yet.
From what I can tell everything is collecting without any issues.

I've just seen some signs of lingering in larger apps but still need to narrow down if this is a culprit

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingp/2Work that is important, but is currently not scheduled for releaseperf/memory-leak 💦Memory usage grows / objects live forever (sub: perf)

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions