update complete memory leak bug

update complete memory leak bug