preventing double remove of Avl_node_base

jaeyong yoo y.jaeyong at ...9...
Thu Jan 3 01:09:41 CET 2013


Avl_node_base::remove function removes itself from the Avl_tree and leaves
the _parent and _child[] variables as they are.
Since someone could try to remove the same Avl_node_base twice by mistake,
it results in the crash of Avl_tree datastructure.
So, how about setting _parent and _child[] to NULL at Avl_node_base::remove
and, at the entry of the remove function, if someone tries to remove twice,
we could warn him.

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list