由于 ARC 不适用于 struct 和 enum,那么它们如何从内存中释放?当它在面试中被问到时,我不得不陷入困境并试图找到正确的答案,但在谷歌上找不到太多关于它的信息。我知道 swift 在处理值类型方面很聪明。但是如何?
memory-management structure value-type automatic-ref-counting swift
automatic-ref-counting ×1
memory-management ×1
structure ×1
swift ×1
value-type ×1