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

fix a Zeroing Weak References problem #41

Merged
merged 1 commit into from
May 11, 2014

Conversation

Rm1210
Copy link
Contributor

@Rm1210 Rm1210 commented May 6, 2014

When I use PXSourceList In osx 10.7, my program will crash exactly like this problem .

I make a demo for this problem.

Please see if that is this the right way to solved the problem.

@alexrozanski
Copy link
Owner

Awesome – great catch! I completely forgot that it wasn't possible to reference NSViewController et al. with zeroing weak references prior to 10.8.

One addition I'm going to make is to still use weak references for 10.8+ since these are supported by NSViewController and NSWindowController and are safer.

alexrozanski added a commit that referenced this pull request May 11, 2014
fix a Zeroing Weak References problem
@alexrozanski alexrozanski merged commit a555035 into alexrozanski:master May 11, 2014
@alexrozanski
Copy link
Owner

Actually scratch that – it makes sense to just use unsafe_unretained for cases where PXSourceList is used in apps that target 10.7 or 10.8+, without having to create separate binaries.

Thanks again!

@Rm1210
Copy link
Contributor Author

Rm1210 commented May 12, 2014

my pleasure!

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.

2 participants