parent = node->parent; if (parent->numChildren > 0)	--(parent->numChildren); while (parent != NULL) { --(parent->numChildrenTotal); parent=parent->parent; }
deleteHTNode(HT_Resource node){	HT_Value		value,nextValue;	HT_View			view;	ldiv_t			cdiv;	uint32			bucketNum, itemListIndex, offset;	XP_ASSERT(node != NULL);	XP_ASSERT(node->view != NULL);	/* HT_SetSelectedState(node, false); */	sendNotification(node, (node->feData != NULL) ?		HT_EVENT_NODE_DELETED_DATA : HT_EVENT_NODE_DELETED_NODATA);	itemListIndex = node->itemListIndex;	value = node->values;	while (value != NULL)	{		nextValue = value->next;		if (value->tokenType == HT_COLUMN_STRING ||		    value->tokenType == HT_COLUMN_DATE_STRING)		{			if (value->data != NULL)			{				freeMem(value->data);				value->data = NULL;			}		}		freeMem(value);		value = nextValue;	}	node->values = NULL;#ifdef DEBUG_RDF_GetSlotValue_Memory_Needs_Freedom	if (node->flags & HT_FREEICON_URL_FLAG)	{		if (node->url[0] != NULL)		{			freeMem(node->url[0]);			node->url[0] = NULL;		}		if (node->url[1] != NULL)		{			freeMem(node->url[1]);			node->url[1] = NULL;		}	}#endif	if ((!node->view->refreshingItemListp) && (node->view->itemList != NULL))	{		/* set node's associated entry in itemList to NULL */		if (itemListIndex < node->view->itemListCount)		{			cdiv  = ldiv(itemListIndex , ITEM_LIST_ELEMENT_SIZE);			bucketNum = (uint32)cdiv.quot;			offset = (uint32)cdiv.rem;			view = node->view;			if (*(view->itemList + bucketNum) != NULL) 			{				*((*(view->itemList + bucketNum)) + offset) = NULL;			}		}		/* update list count if list isn't busy */		if ((gBatchUpdate != true) && (node->view->itemListCount > 0))		{			--(node->view->itemListCount);		}	}	removeHTFromHash(node->view->pane, node);	node->node = NULL;	node->view = NULL;	node->parent = NULL;	node->child = NULL;	node->children = NULL;	 	freeMem(node);}