XVimProject / XVim

Xcode plugin for Vim keybindings
MIT License
5.16k stars 595 forks source link

Compile with ARC enabled #148

Closed tomlu closed 12 years ago

tomlu commented 12 years ago

Is there a reason why ARC is not enabled? If not, we should enable it so we don't have to worry about autorelease/retain etc.

tomlu commented 12 years ago

Scratch that, I see we're running with GC enabled.

If so, am I right in saying that we should never have to call autorelease, retain etc. manually?

JugglerShu commented 12 years ago

The reason is that XVim is first made by me who are not familiar with ARC! I should learn ARC...

Is there any note when I use ARC? Can I erase all of our retain, release, autorelease thing??

tomlu commented 12 years ago

Yes, with ARC you can pretty much remove all retains, releases and autorelease. Instead you use properties and variable annotations to control memory. As the name suggests i's pretty much automatic except for the odd __weak to solve retain cycles.

However, I think Xcode uses GC which I believe forces us to use GC (GC and RC do not mix). With GC it should be much the same - there should be no need for any retains, releases or autoreleases.

Having said that, I'm pretty new to Objective C so if anyone thinks I'm wrong, please chime in and educate me.