fix the memory leak issue
Merge pull request #2285 from yorkerlin/develop

fix the memory leak issue