void Executor_free(Executor *executor) { if(executor == NULL) { return; } DEBUG(("dealloc Executor\n")); Alloc_free_T(executor, Executor); }
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); }
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); }
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); }