3 ms·
So, the buildin stdlib types afaict use arc only to figure out if the instance has a single unique reference. Internally it is a value type. If a variable on on
by zer0zzz 3y ago
So, the buildin stdlib types afaict use arc only to figure out if the instance has a single unique reference. Internally it is a value type. If a variable on one of these types is modified then the existence of more than one reference is used to do a deep copy of the internal value type.
Also, internally the stdlib uses objc arc types nsarray nsstring etc only on Darwin platforms for zero overhead objc interop. This isn't the case on Linux and windows. For some embedded or Micro-swift variant for low level os work there could be a similar stdlib toggle for Darwin I think.