Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/Core/src/Platform/iOS/MauiCALayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public MauiCALayer()

protected override void Dispose(bool disposing)
{
_autosizeToSuperLayerBehavior.Detach();
if (disposing)
{
_autosizeToSuperLayerBehavior.Detach();
}
base.Dispose(disposing);
}

Expand Down Expand Up @@ -419,4 +422,4 @@ bool IsBorderDashed()
return _strokeDash != null;
}
}
}
}
5 changes: 4 additions & 1 deletion src/Core/src/Platform/iOS/StaticCAGradientLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ class StaticCAGradientLayer : CAGradientLayer, IAutoSizableCALayer

protected override void Dispose(bool disposing)
{
_autosizeToSuperLayerBehavior.Detach();
if (disposing)
{
_autosizeToSuperLayerBehavior.Detach();
}
base.Dispose(disposing);
}

Expand Down
5 changes: 4 additions & 1 deletion src/Core/src/Platform/iOS/StaticCALayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ class StaticCALayer : CALayer, IAutoSizableCALayer

protected override void Dispose(bool disposing)
{
_autosizeToSuperLayerBehavior.Detach();
if (disposing)
{
_autosizeToSuperLayerBehavior.Detach();
}
base.Dispose(disposing);
}

Expand Down
7 changes: 5 additions & 2 deletions src/Core/src/Platform/iOS/StaticCAShapeLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ class StaticCAShapeLayer : CAShapeLayer, IAutoSizableCALayer

protected override void Dispose(bool disposing)
{
_autosizeToSuperLayerBehavior.Detach();
if (disposing)
{
_autosizeToSuperLayerBehavior.Detach();
}
base.Dispose(disposing);
}

Expand All @@ -29,4 +32,4 @@ public override void AddAnimation(CAAnimation animation, string? key)
{
// Do nothing, we don't want animations here
}
}
}
Loading