[shared_ptr] Clear p in destructor
diff --git a/src/hb-cplusplus.hh b/src/hb-cplusplus.hh index afad2d1..7612252 100644 --- a/src/hb-cplusplus.hh +++ b/src/hb-cplusplus.hh
@@ -59,7 +59,7 @@ shared_ptr (shared_ptr &&o) : p (o.p) { o.p = nullptr; } shared_ptr& operator = (const shared_ptr &o) { if (p != o.p) { destroy (); p = o.p; reference (); } return *this; } shared_ptr& operator = (shared_ptr &&o) { destroy (); p = o.p; o.p = nullptr; return *this; } - ~shared_ptr () { v::destroy (p); } + ~shared_ptr () { v::destroy (p); p = nullptr; } T* get() const { return p; }