Skip to content

Commit f0edb5b

Browse files
committed
update change notes with migration instructions
1 parent b4a1624 commit f0edb5b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

changes/256.bugfix.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
Retain Objective-C objects when creating Python wrappers and release them when the
2-
Python wrapped is garbage collected.
2+
Python wrapped is garbage collected. This means that manual ``retain`` calls and
3+
subsequent ``release`` or ``autorelease`` calls from Python are no longer needed with
4+
very few exceptions such as:
5+
6+
1. When implementing methods like ``copy`` that are supposed to create an object, if
7+
the returned object is not actually newly created.
8+
2. When dealing with side effects of methods like ``init`` that may release an object
9+
which is still referenced from Python. See for example
10+
https://github.com/beeware/toga/issues/2468.

changes/256.removal.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Rubicon no longer skips releasing an Objective-C objects when its Python wrapped is
2+
garbage collected. This means that fewer ``retain`` than ``release`` calls will cause
3+
segfaults on garbage collection. Review your code carefully for unbalanced ``retain``
4+
and ``release`` calls before updating.

0 commit comments

Comments
 (0)