Skip to content

Commit

Permalink
Revert memory retention fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Oct 31, 2023
1 parent 79c66a4 commit d140e24
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cocoa/src/toga_cocoa/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit d140e24

Please sign in to comment.