bug: UIWidget removeAllChildren cant work

for loop bug
Merge pull request #1284 from kuaipao/patch-4

Hi,kuaipao.
Thank you for your commits.
Yes ,this a bug that can not  remove all children correctly ,because the length of children has change.
And i suggest add ; after return, i will add it in soon.