fix memory leak
fix coding style
Merge pull request #6942 from minggo/memory-leak-sprite-frame-cache

Memory leak sprite frame cache