什么是智能指针 what is smart pointer

智能指针是一种抽象数据类型,通过操作符重载来用来模拟传统指针的行为,用来实现内存资源的管理。智能指针一般通过模板来实现。auto_ptr是一种智能指针。

 

A smart pointer is an abstract data type that simulates the behavior of traditional (raw) pointers by means of operator overloading while providing additional memory management algorithms. Smart pointers may be implemented as a template class. Auto pointer is smart pointer.

你可能感兴趣的:(什么是智能指针 what is smart pointer)