library destructor