Ejemplo n.º 1
0
void Executor_free(Executor *executor)
{
	if(executor == NULL) {
		return;
	}
	DEBUG(("dealloc Executor\n"));
	Alloc_free_T(executor, Executor);
}
Ejemplo n.º 2
0
void Buffer_free(Buffer *buffer)
{
    Alloc_free(buffer->buff, buffer->buff_size);
    if(buffer->capacity > buffer->buff_size) {
        DEBUG(("Clearing enlarged buffer\n"));
        Alloc_free(buffer->data, buffer->capacity);
    }
    DEBUG(("dealloc Buffer\n"));
    Alloc_free_T(buffer, Buffer);
}
Ejemplo n.º 3
0
void Connection_free(Connection *connection)
{
	if(connection == NULL) {
		return;
	}
	if(connection->parser != NULL) {
		ReplyParser_free(connection->parser);
	}
	DEBUG(("dealloc Connection\n"));
	Alloc_free_T(connection, Connection);
}
Ejemplo n.º 4
0
void Ketama_free(Ketama *ketama)
{
	if(ketama->continuum != NULL) {
		Alloc_free(ketama->continuum, ketama->numservers * sizeof(mcs) * 160);
		ketama->continuum = NULL;
	}
	if(ketama->servers != NULL) {
		Alloc_free(ketama->servers, ketama->maxservers * sizeof(serverinfo));
		ketama->servers = NULL;
	}
	Alloc_free_T(ketama, Ketama);
}