Jacob Carlborg:

@arc class Foo
{
    T1 opAddRef();
    T2 opRelease();
}
...
Alternative A gives a clear documentation it's a reference counted class without having to scan the methods.

Assuming you want something like DIP74, this design design seems safer than the design proposed in DIP74.

Bye,
bearophile

Reply via email to