Skip to content

Commit

Permalink
Remove some over-enthusiastic memory retention.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Apr 5, 2024
1 parent dad68bb commit c714175
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion cocoa/src/toga_cocoa/widgets/detailedlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def tableView_objectValueForTableColumn_row_(self, table, column, row: int):
data = value._impl
except AttributeError:
data = TogaData.alloc().init()
data.retain()
value._impl = data

try:
Expand Down
1 change: 0 additions & 1 deletion cocoa/src/toga_cocoa/widgets/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def tableView_viewForTableColumn_row_(self, table, column, row: int):

# Prevent tcv from being deallocated prematurely when no Python references
# are left
tcv.retain()
tcv.autorelease()

tcv.setText(str(value))
Expand Down
1 change: 0 additions & 1 deletion cocoa/src/toga_cocoa/widgets/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def outlineView_viewForTableColumn_item_(self, tree, column, item):

# Prevent tcv from being deallocated prematurely when no Python references
# are left
tcv.retain()
tcv.autorelease()

tcv.setText(str(value))
Expand Down

0 comments on commit c714175

Please sign in to comment.