This commit is contained in:
iridiumR 2021-12-03 17:46:47 +08:00
parent ae5ac85603
commit b66d7daea8

View file

@ -15,6 +15,10 @@ public:
binNode *rc; binNode *rc;
~binNode() ~binNode()
{ {
if(isLC(this))
parent->lc = NULL;
else
parent->rc = NULL;
delete lc; delete lc;
delete rc; delete rc;
} }