Closed andrewrothman closed 10 years ago
You need to do a lot more than this for peertalk to work in a non-ARC environment, like retain/release/autorelease of different objects. If you make a complete patch, I'll merge it.
It seems to work in a non-ARC environment but whether is works well is the question. I'm not too sure. All this patch was meant to do was to get Xcode to stop complaining about the warnings. I don't think I'm willing to take up the full effort of porting to non-ARC or at least not at this time.
Just making the compiler stop complaining is like putting a screaming baby in the basement — you momentarily alter on the effects w/o actually solving on the problem. Peertalk will leak like a broken umbrella and crash like a dead bird with this patch. If you don't like ARC for some reason, then you have no choice but to manage all references.
That's true. I wan't sure whether or not any additional work had to be done. I'm not an expert in memory management. What else would need to be released?
Also, ARC is according to Apple the future (and I agree), so unless you plan on supporting iOS 3x and older, or old versions of OS X, you should build this library with ARC (you can still write your own code w/o ARC — it's a per-source-file configuration).
Let me know if 1e30f1f8c96203c2a3aa736bd793aa27e5f0b6e1 solved your issues.
Check if ARC is disabled and if so, call [super dealloc] when needed.