It's cool that you don't need to bother with specifying the type as being std::shared_ptr<T> or Arc<T>, but it's not particularly novel, either. It's "just" syntax sugar (or lack of syntax sugar I guess?)
[1] https://clang.llvm.org/docs/AutomaticReferenceCounting.html#...
ARC can't do anything magic here vs. something like really careful use of std::move & const references.
Are you just referring to standard RVO? If you return a std::shared_ptr in C++ today you won't get the equivalent of retain+release, either, RVO avoids that.
> For example, if the user puts logging statements in retain, they should not be surprised if those statements are executed more or less often depending on optimization settings
> In general, ARC does not perform retain or release operations when simply using a retainable object pointer as an operand within an expression
> However, C and C++ already call this undefined behavior because the evaluations are unsequenced, and ARC simply exploits that here to avoid needing to retain arguments across a large number of calls.
> ARC performs no extra mandatory work on the caller side, although it may elect to do something to shorten the lifetime of the returned value.
That's optional tho, and I never use it that way.
Are you using your own implementation of retain & release or something?
@property (strong, nonatomic) UIView* unselectedTabsView;
"nonatomic" means avoid synchronization code. This code is not thread safe for that reason, but I never do cross-thread access anyways.