Skip to content

Commit e66dfdb

Browse files
committed
placement new 勘误 README_Details.md
huihut#33
1 parent 9a0ba43 commit e66dfdb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README_Details.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -988,16 +988,16 @@ int main()
988988

989989
#### 定位 new
990990

991-
定位 new(placement new)允许我们向 new 传递额外的参数
991+
定位 new(placement new)允许我们向 new 传递额外的地址参数,从而在预先指定的内存区域创建对象
992992

993993
```cpp
994-
new (palce_address) type
995-
new (palce_address) type (initializers)
996-
new (palce_address) type [size]
997-
new (palce_address) type [size] { braced initializer list }
994+
new (place_address) type
995+
new (place_address) type (initializers)
996+
new (place_address) type [size]
997+
new (place_address) type [size] { braced initializer list }
998998
```
999999
1000-
* `palce_address` 是个指针
1000+
* `place_address` 是个指针
10011001
* `initializers` 提供一个(可能为空的)以逗号分隔的初始值列表
10021002
10031003
### delete this 合法吗?

0 commit comments

Comments
 (0)