fixed some more long standing leaks in generated code

git-svn-id: https://roadrunnerlib.googlecode.com/svn/branches/refactor_modelgen@942 c0027639-9190-0b57-01eb-f09a03790dae
Merge branch 'git-refactor-modelgen' of github.com:AndySomogyi/roadrunner into git-refactor-modelgen