modified texture manager to include destructor