We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
copyWithZone_
1 parent 0cc032d commit 147a1a2Copy full SHA for 147a1a2
cocoa/src/toga_cocoa/widgets/internal/data.py
@@ -5,6 +5,9 @@ class TogaData(NSObject):
5
@objc_method
6
def copyWithZone_(self):
7
# TogaData is used as an immutable reference to a row
8
- # so the same object can be returned as a copy.
+ # so the same object can be returned as a copy. We need
9
+ # to manually `retain` the object before returning because
10
+ # the "copy" methods are assumed to return an object that
11
+ # is owned by the caller.
12
self.retain()
13
return self
0 commit comments