Skip to content

Commit

Permalink
Merge pull request #7013 from unoplatform/dev/jela/commandbar-drain
Browse files Browse the repository at this point in the history
fix(commandbar): [iOS] Don't fetch the internal TitleView parent on invalidate measure
  • Loading branch information
jeromelaban authored Sep 11, 2021
2 parents 58323c1 + 0a9a729 commit 4e56ebe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Uno.UI/Controls/CommandBarNavigationItemRenderer.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@ internal partial class TitleView : Border
private Size _childSize;
private Size? _lastAvailableSize;

public override void SetSuperviewNeedsLayout()
{
// Skip the base invocation because the base fetches the native parent
// view. This process creates a managed proxy during navigations, the
// native counterpart is released. This causes the managed NSObject_Disposer:Drain
// to fail to release an already released native reference.
//
// See https://github.com/unoplatform/uno/issues/7012 for more details.
}

internal TitleView()
{
if (UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
Expand Down

0 comments on commit 4e56ebe

Please sign in to comment.