Registriert seit: 4. Jun 2010
15.774 Beiträge
|
Optimizing ARC the hard way
30. Jan 2018, 00:00
One of the potentially unnecessary ARC triggers is passing a reference counted entity as a parameter. Depending on the parameter's declaration, the compiler might insert transient reference counting code in the prologue and epilogue of the called procedure (function, method).
Parameters passed with the default (value) semantics will trigger the reference counting mechanism. On the other hand, parameters passed as references - declared as var, const, [ref],
|