[Document] fixed memory leak on exit.