Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Fix a crash on macOS 10.11.#62

Open
antons wants to merge 1 commit intoalexrozanski:masterfrom
antons:fix/crash-on-10.11
Open

Fix a crash on macOS 10.11.#62
antons wants to merge 1 commit intoalexrozanski:masterfrom
antons:fix/crash-on-10.11

Conversation

@antons
Copy link

@antons antons commented Jun 15, 2018

  • delegate and dataSource are assign (notweak) on macOS 10.11.
  • dataSource was set to nil before delegate, and when dataSource is changed NSTableView notifies the delegate about removing all rows.
  • Fixed crash in -PXSourceList dealloc #58 introduced an issue where _delegateDataSourceProxy was released before setting delegate and dataSource to nil.
  • When NSTableView attempted to notify the delegate about removing all rows it was already released, which caused crashes.

- `delegate` and `dataSource` are `assign` (not`weak`) on macOS 10.11.
- `dataSource` was set to `nil` before `delegate`, and when `dataSource` is changed `NSTableView` notifies the `delegate` about removing all rows.
- alexrozanski#58 introduced an issue where `_delegateDataSourceProxy` was released before setting `delegate` and `dataSource` to `nil`.
- When `NSTableView` attempted to notify the `delegate` about removing all rows it was already released, which caused crashes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant