Update 05.PrototypePattern.md
parent
035e5f4a89
commit
bd402ae1a1
|
@ -142,6 +142,8 @@ int main()
|
|||
return 0;
|
||||
}
|
||||
```
|
||||
![avatar](https://github.com/FengJungle/DesignPattern/blob/master/05.PrototypePattern/1.Picture/%E6%B5%85%E6%8B%B7%E8%B4%9D.png)
|
||||
|
||||
显然,这不是我们想要的结果。接下来我们使用clone方法。
|
||||
|
||||
#### 4.2.2.示例二:深拷贝
|
||||
|
@ -175,7 +177,7 @@ int main()
|
|||
}
|
||||
```
|
||||
效果如下图:
|
||||
|
||||
![avatar](https://github.com/FengJungle/DesignPattern/blob/master/05.PrototypePattern/1.Picture/%E6%B7%B1%E6%8B%B7%E8%B4%9D.png)
|
||||
|
||||
|
||||
## 5.原型模式总结
|
||||
|
|
Loading…
Reference in New Issue