From b66d7daea83b949280270369d0fc302f9dba5d93 Mon Sep 17 00:00:00 2001 From: iridiumR Date: Fri, 3 Dec 2021 17:46:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ex10/binnode.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ex10/binnode.hpp b/ex10/binnode.hpp index da5a253..f3bfe62 100644 --- a/ex10/binnode.hpp +++ b/ex10/binnode.hpp @@ -15,6 +15,10 @@ public: binNode *rc; ~binNode() { + if(isLC(this)) + parent->lc = NULL; + else + parent->rc = NULL; delete lc; delete rc; }