Closed Rm1210 closed 10 years ago
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.
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!
my pleasure!
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.