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

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

函数

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

详细描述

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

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

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

函数说明

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

在文件 yref.hpp64 行定义.

参考 ydelete.

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

在文件 memory.hpp96 行定义.

参考自 YSLib::safe_delete_obj::operator()(),YSLib::GDependency< _tEvent, _tOwnerPointer >::Reset() , 以及 DSApplication::~DSApplication().

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

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

在文件 memory.hpp106 行定义.