1. -Fix a memory leak.
2. -Delete some useless code.