What is the difference between copy and retain ?
What is the difference between copy and retain ?
Here is the difference between the copy and retain methods in Objective-C:
copycopy method creates a new object that is an exact copy of the original object.NSString or NSArray.copy method creates a new mutable object with the same contents.copy method is typically used to ensure that an object's state is not accidentally modified by another part of the code.Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.