Skip to content

Commit

Permalink
Revert "[ios] fix memory leak in RadioButton (#22800)
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen authored Jun 3, 2024
1 parent ec3e44c commit 4a1c76c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Controls/src/Core/Border/Border.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,10 @@ void NotifyStrokeShapeChanges()

if (strokeShape is VisualElement visualElement)
{
SetInheritedBindingContext(visualElement, BindingContext);
AddLogicalChild(visualElement);
_strokeShapeChanged ??= (sender, e) => OnPropertyChanged(nameof(StrokeShape));
_strokeShapeProxy ??= new();
_strokeShapeProxy.Subscribe(visualElement, _strokeShapeChanged);

OnParentResourcesChanged(this.GetMergedResources());
((IElementDefinition)this).AddResourcesChangedListener(visualElement.OnParentResourcesChanged);
}
}

Expand All @@ -80,9 +77,7 @@ void StopNotifyingStrokeShapeChanges()

if (strokeShape is VisualElement visualElement)
{
((IElementDefinition)this).RemoveResourcesChangedListener(visualElement.OnParentResourcesChanged);

SetInheritedBindingContext(visualElement, null);
RemoveLogicalChild(visualElement);
_strokeShapeProxy?.Unsubscribe();
}
}
Expand Down

0 comments on commit 4a1c76c

Please sign in to comment.