123
AvlNode *oldNode = t; t = (t->left != nullptr) ? t->left : t->right; //Specifically this line delete oldNode;
1234
if (t->left != nullptr) t = t->left; else t = t->right;