Can there be an ARC equivalent for C#

1k views Asked by At

Coming from .NET (C#) development to do a bit of Objective-C coding, I have stumbled upon ARC (Automatic Reference Counting).

I know that C++ (and probably Objective-C) have deterministic destruction semantics, and ARC seems to be another step in the same direction.

While I am not familiar with the internals of it, I was wondering (at the theoretic level) whether an ARC equivalent could have been retrofitted on top of .NET (that uses a GC).

1

There are 1 answers

0
Sinix On BEST ANSWER

Actually, there are some refcounting. COM and RCW interop (more info here) and Safe handles for example.

However, there's no reference-counted objects to be used explicitly. And to be honest, you almost never will be cared about refcounting under the cover, at least until it works:)

P.S. If you're interested in "why not?" reasons, here's the answer.