前方的大水
所有这些都已排序,现在我留下了大量警告(黄色警告)。
调高警告级别。把它们都修好。
我担心我会忘记一些东西,把记忆弄得一团糟。
您认为从 64 位应用程序升级到 32/64 位应用程序的最佳方式是什么?
担心是自然的,考虑到问题。
一种快速解决方法是使用启用垃圾收集的 ObjC。这样做并相信它会在没有额外更改的情况下工作是一个错误(阅读:您应该保留大量时间用于测试和寻找错误)。
the other approach, if you really want good support on both 32 and 64, would be to use MRC -- but you should just commit to MRC for both 32 and 64 bit in that case (no ARC). of course, this will require a lot of reviewing, fixing, manual testing, and testing for leaks (unless your program is small). this is the preferable solution for an app with good long term support and high quality standards, IMO.
why is ARC used in the first place if there are many macs that aren't compatible with it?
there really aren't a whole lot of macs out there that require 32 bit. if you were releasing a 1.0 today, you should just consider making it 64 bit only.
32 bit should have been supported and tested from the beginning of development, if it was a requirement -- either the ARC option or 32 bit would have been eliminated very early on. it seems odd that this oversight would slip through testing and development.
Update to recommended settings
Hit "Validate Settings", review, perform changes.
Property 'delegate' requires method 'delegate' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation
echo warning message
Property 'delegate' requires method 'setDelegate:' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation
echo warning message
'__bridge' casts have no effect when not using ARC
you would just use a c-style cast in that case
Variable 'loc_tip' is used uninitialized whenever 'if' condition is false
ARC does this for you. just do what ARC would do:
NSSomething * loc_tip = nil;
Variable 'loc_tip' is used uninitialized whenever '&&' condition is false
echo previous response
Conflicting parameter types in implementation of 'tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:': 'NSInteger' (aka 'int') vs 'long'
the selector's declaration does not match -- copy the declaration from the header (NSTableView.h
) and see if that change (of parameter types) requires any other changes to your implementations.