Ejemplo n.º 1
0
MprCond::~MprCond()
{
	mutex->lock();
	pthread_cond_destroy(&cv);
#if BLD_DEBUG
	condList.remove(&link);
#endif
	delete mutex;
}
Ejemplo n.º 2
0
MprMutex::~MprMutex()
{
	pthread_mutex_unlock(&cs);
	pthread_mutex_destroy(&cs);
#if BLD_DEBUG
	pthread_mutex_lock(&listLock);
	mutexList.remove(&link);
	pthread_mutex_unlock(&listLock);
#endif
}
Ejemplo n.º 3
0
MaClient::~MaClient()
{
	//
	//	Must be careful because readEventWrapper is passed "this" and must
	//	not accessed a deleted object. Remove from the list of clients safely
	//	and readEventWrapper will check if it has been deleted.
	//
	mprGetMpr()->lock();
	lock();
	mprGetMpr()->unlock();

	clients.remove(this);

	if (sock) {
		sock->setCallback(readEventWrapper, (void*) this, 0, 0);
		mprLog(3, tMod, "%d: ~MaClient: close sock\n", sock->getFd());
		sock->close(0);
		sock->dispose();
		sock = 0;
	}

	delete headerValues;
	delete inBuf;
	delete outBuf;
	delete responseContent;
	delete responseHeader;

	mprFree(authCnonce);
	mprFree(method);
	mprFree(serverAlgorithm);
	mprFree(serverDomain);
	mprFree(serverNonce);
	mprFree(serverOpaque);
	mprFree(serverRealm);
	mprFree(serverQop);
	mprFree(serverStale);
	mprFree(serverAuthType);
	mprFree(errorMsg);
	mprFree(defaultHost);
	mprFree(proxyHost);
	mprFree(realm);
	mprFree(responseProto);
	mprFree(responseText);
	mprFree(password);
	mprFree(user);
	mprFree(userHeaders);
	mprFree(secret);

	if (timer) {
		timer->stop(MPR_TIMEOUT_STOP);
		timer->dispose();
		timer = 0;
	}

#if BLD_FEATURE_LOG
	delete tMod;
#endif
#if BLD_FEATURE_MULTITHREAD
	delete completeCond;
	delete mutex;
#endif
}