diff options
Diffstat (limited to 'hwpfilter/source/nodes.h')
-rw-r--r-- | hwpfilter/source/nodes.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hwpfilter/source/nodes.h b/hwpfilter/source/nodes.h index 9d238e75c945..dce473e13fa5 100644 --- a/hwpfilter/source/nodes.h +++ b/hwpfilter/source/nodes.h @@ -26,6 +26,7 @@ #include <vector> #include <stdio.h> #include <stdlib.h> +#include <o3tl/deleter.hxx> #include <osl/diagnose.h> enum IDLIST { @@ -68,7 +69,6 @@ class Node{ public: explicit Node(int _id) : id(_id) { - value = nullptr; child = nullptr; next = nullptr; #ifdef NODE_DEBUG @@ -78,9 +78,6 @@ public: } ~Node() { - if( value ) free( value ); - // if( child ) delete child; - // if( next ) delete next; next = nullptr; child = nullptr; #ifdef NODE_DEBUG @@ -91,7 +88,7 @@ public: public: static int count; /* For memory debugging */ int id; - char *value; + std::unique_ptr<char, o3tl::free_delete> value; Node *child; Node *next; }; |