clean up and fixed long standing mem leak

git-svn-id: https://roadrunnerlib.googlecode.com/svn/branches/refactor_modelgen@902 c0027639-9190-0b57-01eb-f09a03790dae
clean up and fixed long standing mem leak

git-svn-id: https://roadrunnerlib.googlecode.com/svn/branches/refactor_modelgen@903 c0027639-9190-0b57-01eb-f09a03790dae
null pointers for zero size arrays

git-svn-id: https://roadrunnerlib.googlecode.com/svn/branches/refactor_modelgen@904 c0027639-9190-0b57-01eb-f09a03790dae
work around for memory corruption issue

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

git-svn-id: https://roadrunnerlib.googlecode.com/svn/branches/refactor_modelgen@906 c0027639-9190-0b57-01eb-f09a03790dae