From afa4a3fb3ab1eda0509f5df82bca3812818e105a Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 30 Oct 2023 12:38:21 +0800 Subject: [PATCH] Revert memory retention fix. --- cocoa/src/toga_cocoa/constraints.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cocoa/src/toga_cocoa/constraints.py b/cocoa/src/toga_cocoa/constraints.py index e84bfc26ff..b0de131005 100644 --- a/cocoa/src/toga_cocoa/constraints.py +++ b/cocoa/src/toga_cocoa/constraints.py @@ -16,10 +16,6 @@ def __init__(self, widget): :param widget: The Widget implementation to be constrained. """ self.widget = widget - # Since we can't control the order in which objects are disposed, we need to make - # sure the widget still has a reference to it when we delete the constraints - # that reference that widget - self.widget.native.retain() self.widget.native.translatesAutoresizingMaskIntoConstraints = False self._container = None @@ -34,7 +30,6 @@ def __init__(self, widget): # of constraints can take several iterations before it occurs. def __del__(self): # pragma: nocover self._remove_constraints() - self.widget.native.release() def _remove_constraints(self): if self.container: