Beispiel #1
0
void ObjectContainer::destructorHelper(containerNode * current){
	if (current != NULL){
		destructorHelper(current->left);
		destructorHelper(current->right);
		delete current->data;
		current->data = NULL;
		delete current;
		current = NULL;
	}
}
void ComedyObjContainer::destructorHelper(containerNode * current){
	if (current != NULL){
		destructorHelper(current->left);
		destructorHelper(current->right);
		const MovieObject* e = dynamic_cast<const MovieObject*>(current->data);
		const ComedyObj* p = dynamic_cast< const ComedyObj* >(e);
		current->data = NULL;
		delete current;
		current = NULL;
	}
}
void BinarySearchTree::destructorHelper(BinaryTreeNode* node) {

	if (node == NULL) {
		return;
	}

	destructorHelper(node->getLeft());
	destructorHelper(node->getRight());

	delete node;
}
Beispiel #4
0
ExecutionTracker::~ExecutionTracker() {
    checkForDanglingThreads();
    destructorHelper();
    delete log;
    delete global_lock;
    delete bt;
    delete signal_cond;
}
Beispiel #5
0
void ExecutionTracker::thrilleAssert(thrID myself,
        void * ret_addr, bool cond) {
    if (!cond) {
        log->programAssertFail(myself, ret_addr);
        destructorHelper();
        _Exit(UNRECOVERABLE_ERROR);
    }
}
Beispiel #6
0
void ExecutionTracker::deadlockCheck() {
    map<thrID, bool>::iterator itr;
    for (itr = enable_map.begin(); itr != enable_map.end(); itr++) {
        if (itr->second) {
            return;
        }
    }

    log->programDeadlock();
    destructorHelper();
    _Exit(UNRECOVERABLE_ERROR);
}
ComedyObjContainer::~ComedyObjContainer(){
	destructorHelper(root);
	root = NULL;
}
Beispiel #8
0
void ExecutionTracker::segfault(thrID myself) {
    log->segfault(myself);
    destructorHelper();
}
BinarySearchTree::~BinarySearchTree() {
	destructorHelper(root);
}
Beispiel #10
0
ObjectContainer::~ObjectContainer(){
	destructorHelper(root);
	root = NULL;
}