趣味で作ってるロボット用ソフトウェア
 All Classes Files Functions Enumerations Enumerator Friends Pages
delete_object.hpp
Go to the documentation of this file.
1 #ifndef HRK_DELETE_OBJECT_H
2 #define HRK_DELETE_OBJECT_H
3 
9 #include <algorithm>
10 
11 
12 namespace hrk
13 {
15  {
21  template<typename T>
22  void operator()(const T* pointer) const
23  {
24  if (pointer) {
25  delete pointer;
26  pointer = NULL;
27  }
28  }
29  };
30 }
31 
32 #endif
Definition: delete_object.hpp:14
void operator()(const T *pointer) const
オブジェクトの削除
Definition: delete_object.hpp:22