std::declare_no_pointers
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| 在头文件 <memory> 中定义
|
||
| void declare_no_pointers( char *p, std::size_t n ) |
(C++11 起) | |
通知垃圾收集器或泄漏检测器,指定的内存区域(
n字节开始的字节所指向的p)不包含可追溯的指针。如果任何部分的区域内的分配对象中,必须包含在相同的对象的整个区域.原文:
Informs the garbage collector or leak detector that the specified memory region (
n bytes beginning at the byte pointed to by p) contains no traceable pointers. If any part of the region is within an allocated object, the entire region must be contained in the same object.目录 |
[编辑] 参数
| p | - | 的范围内的开头的指针
原文: pointer to the beginning of the range |
| n | - | 的范围中的字节数
|
[编辑] 返回值
(无)
[编辑] 例外
无
[编辑] 示例
| 本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
| (C++11) |
取消的std::declare_no_pointers效果 原文: cancels the effect of std::declare_no_pointers (函数) |