rem: free(ptr);
add: wfree(ptr);
context: WMRemoveFromBag(WMBag *self, void *item){    W_Node *ptr = treeFind(self->root, self->nil, item);    if (ptr != self->nil) {        W_Node *tmp;        self->count--;        tmp = treeSuccessor(ptr, self->nil);        while (tmp != self->nil) {            tmp->index--;            tmp = treeSuccessor(tmp, self->nil);        }        ptr = rbTreeDelete(self, ptr);        if (self->destructor)            self->destructor(ptr->data);        free(ptr);        return 1;    } else {        return 0;    }}