Tag: ARC

  • Memory management in Swift

    Memory management in Swift is done by Automatic Reference Counting or ARC. Whenever a variables holds an instance of an object the memory count for that object increases by 1. And when variable becomes out of scope or set to nil, the memory count decreases 1. class Teacher { var name: String? var course: String?…