fixing memory leak in dojo-based Todo

This PR fixes a memory leak in Todo applicaiton developed using Dojo.