Skip to content

Commit

Permalink
Update 17.第十七题.md
Browse files Browse the repository at this point in the history
  • Loading branch information
liberalisman authored Dec 22, 2020
1 parent 05cbfc7 commit 7c3f5db
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions 内存管理/17.第十七题.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
`浅拷贝`指针拷贝

**浅拷贝**
![浅拷贝](http://okhqmtd8q.bkt.clouddn.com/%E6%B5%85%E6%8B%B7%E8%B4%9D.png)
浅拷贝: 将原对象或原数组的引用直接赋给新对象,新数组,新对象/数组只是原对象的一个引用

**深拷贝**
![](http://okhqmtd8q.bkt.clouddn.com/%E6%B7%B1%E6%8B%B7%E8%B4%9D.png)
深拷贝: 创建一个新的对象和数组,将原对象的各项属性的“值”(数组的所有元素)拷贝过来,是“值”而不是“引用”

对OC中的不可变对象/可变对象进行copy/mutableCopy分别是什么拷贝





**总结**
![](http://okhqmtd8q.bkt.clouddn.com/copy%E5%85%B3%E9%94%AE%E5%AD%97.png)




Expand Down

0 comments on commit 7c3f5db

Please sign in to comment.