Skip to content

Commit

Permalink
update change notes with migration instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
samschott committed Nov 24, 2024
1 parent b4a1624 commit 6648cd0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion changes/256.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
Retain Objective-C objects when creating Python wrappers and release them when the
Python wrapped is garbage collected.
Python wrapped is garbage collected. This means that manual ``retain`` calls and
subsequent ``release`` or ``autorelease`` calls from Python are no longer needed with
very few exceptions such as:

1. Implementing methods that create an object, such as ``copy``, if the object is not
already retained before it is returned.
2. Side effects of methods such as ``init`` that may release an object which is still
referenced from Python.
4 changes: 4 additions & 0 deletions changes/256.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Rubicon no longer skips releasing an Objective-C objects when its Python wrapped is
garbage collected. This means that fewer ``retain`` than ``release`` calls will cause
segfaults on garbage collection. Review your code carefully for unbalanced ``retain``
and ``release`` calls before updating.

0 comments on commit 6648cd0

Please sign in to comment.