private Region remove ( Region x ) { this . deletedNode = NULL_NODE ; this . root = remove ( x , this . root ) ; Region d = this . deletedElement ; // deletedElement is set to null to free the reference, // deletedNode is not freed as it will endup pointing to a valid node. this . deletedElement = null ; if ( d == null ) { return null ; } else { return new Region ( d ) ; } }
Remove from the tree .