removed memory leak
Merge pull request #1240 from guitcastro/master

removed memory leak