maui icon indicating copy to clipboard operation
maui copied to clipboard

Border.StrokeShape is not currently being Garbage Collected

Open marco-skizza opened this issue 6 months ago • 1 comments

Description

Hi

Possibly related to: https://github.com/dotnet/maui/issues/20163

When I add the following Xaml to a page, the page doesn't get garbage collected any more when navigating back:

        <Border>
            <Border.StrokeShape>
                <RoundRectangle CornerRadius="5" />
            </Border.StrokeShape>

            <Label Text="Border with StrokeShape is leaking" />

        </Border>

Steps to Reproduce

  • Run the project
  • Click Button and go back again multiple times
  • Observe that ~Page2() never gets called

Link to public reproduction project repository

https://github.com/marco-skizza/MauiPageMemory

Version with bug

8.0.6 SR1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, I was not able test on other platforms

Affected platform versions

iPadOS 17.3.1 on iPad mini 6

Did you find any workaround?

No

Relevant log output

No response

marco-skizza avatar Feb 17 '24 16:02 marco-skizza

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Feb 19 '24 15:02 ghost

this is not only ios related. Same thing happen on Android in case you make a global Style for a Border (https://github.com/dotnet/maui/issues/20163)

something like this <Style x:Key="FooterStyle" TargetType="Border"> <Setter Property="StrokeShape"> <Setter.Value> <RoundRectangle CornerRadius="16,16,0,0" /> </Setter.Value> </Setter> </Style>

Larhei avatar Mar 22 '24 15:03 Larhei

Verified this on VS 17.10.0 Preview 2.0(8.0.10). Repro on iOS 17.2 and MacCatalyst, not repro on Windows 11, Android 14.0-API34 with below Project: MauiPageMemory.zip

XamlTest avatar Mar 25 '24 07:03 XamlTest

Seems to be fixed with .NET MAUI 8.0.20. Thanks!

marco-skizza avatar Apr 10 '24 09:04 marco-skizza