YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
Reset Pointers

安全删除指定引用的指针指向的对象。 更多...

函数

template<typename _type >
bool ystdex::reset (std::unique_ptr< _type > &p)
 
template<typename _type >
bool ystdex::reset (std::shared_ptr< _type > &p)
 
template<typename _type >
bool YSLib::reset (_type *&p) ynothrow
 

详细描述

安全删除指定引用的指针指向的对象。

安全删除指定引用的句柄指向的对象。

后置条件
指定引用的指针为空。
自从
build 209
后置条件
指定引用的句柄值等于 nullptr 。
自从
build 209

函数说明

template<typename _type >
bool YSLib::reset ( _type *&  p)
inline

在文件 yref.hpp69 行定义.

参考 ydelete.

参考自 YSLib::safe_delete_obj::operator()().

这是这个函数的调用关系图:

template<typename _type >
bool ystdex::reset ( std::unique_ptr< _type > &  p)
inline

在文件 memory.hpp77 行定义.

template<typename _type >
bool ystdex::reset ( std::shared_ptr< _type > &  p)
inline

在文件 memory.hpp88 行定义.