-
-
Notifications
You must be signed in to change notification settings - Fork 56
Updated memory management #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 54 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
9abcd0d
Retain on ObjCInstance creation, autorelease on __del__
samschott 6605842
update tests
samschott 931c352
add change note
samschott a618f2a
use autorelease instead of release in __del__
samschott b1bf61c
code formatting
samschott 21f2e0b
update docs
samschott 20ab8f9
add comment about autorelease vs release
samschott 160c819
remove now unneeded cache staleness check
samschott ce9d78c
remove stale instance cache tests
samschott 6d89330
update test_objcinstance_dealloc
samschott 3bb7ccc
correct inline comment
samschott c0b091c
make returned_from_method private
samschott ab1f762
update ObjCInstance doc string
samschott 544d694
updated docs
samschott b4a1624
update spellchecker
samschott f0edb5b
update change notes with migration instructions
samschott 22396dc
Rephrase removal note
samschott 7d51fde
remove unneeded space in doc string
samschott acfa546
change bugfix to feature note
samschott 18e08cc
Fix incorrect inline comment
samschott 532fbe0
trim trailing whitespace
samschott 52e92c0
update test comment
samschott efed734
check that objects are not deallocated before end of autorelease pool
samschott ab8a895
merge object lifecycle tests
samschott 30e4277
add a test case for copyWithZone returning the existing instance with…
samschott c3a4fe1
release additional refcounts by copy calls on the same ObjCInstance
samschott 7bdc31f
rewrite the copy lifecycle test to use NSDictionary instead of a cust…
samschott 460728b
prevent errors on ObjCInstance garbage collection when `send_message`…
samschott d9c0f62
switch copy lifecycle test to use NSString
samschott 49d9381
remove unused import
samschott e0d7792
fix spelling mistake
samschott 715912f
spelling updates
samschott 20e45b6
spelling updates
samschott 86b29a4
spelling updates
samschott 944328d
black code formatting
samschott 3b88aaa
rename test case to "immutable copy lifecycle"
samschott 58d0276
improve inline docs
samschott 84e3a9f
special handling for init
samschott ab46b9d
add tests for init object change
samschott 2305122
implement proper method family detection
samschott 2e4eccb
ensure partial methods are loaded from all superclasses
samschott 2989540
remove unneeded whitespace
samschott 0bc749c
improved release-on-cache-hit documentation
samschott 04981e3
updated change notes
samschott 54ed55c
add test for get_method_family
samschott c6096c2
remove loop that breaks early on method loading
samschott a28c901
make method loading slightly clearer
samschott 1b306e2
extract and document method name to tuple logic
samschott 849749e
fall back to full method usage if partial method lookup fails
samschott 15593c1
update partial method cache after successful lookup
samschott 39c548e
Revert "remove loop that breaks early on method loading"
samschott b78c41d
Revert "ensure partial methods are loaded from all superclasses"
samschott cb996ad
Reapply "ensure partial methods are loaded from all superclasses"
samschott 6cf88a5
centralize logic for method family
samschott aa48b5d
update test description
samschott 7fa9e71
update inline comments
samschott 3be2190
fix method family detection
samschott dded73e
add test case for alloc without init
samschott 199f807
race free interpreter shutdown handling
samschott d0961b4
black formatting
samschott a8e9193
more precise family determination to follow the exact rules laid out …
samschott 296cf83
update tests for method family determination to check for non-lowerca…
samschott 93300f3
fix typo in method_name_to_tuple doc string
samschott 2be945b
more exhaustive refcount tests
samschott 2387c02
remove duplicate code from test_objcinstance_returned_lifecycle
samschott 51ba75b
Fix typo
mhsmith File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Retain Objective-C objects when creating Python wrappers and release them when the | ||
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, for example when writing implementations of ``copy`` that return an | ||
existing object. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Manual calls to ``release`` or ``autorelease`` no longer cause Rubicon | ||
to skip releasing an Objective-C object when its Python wrapper 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.