Fixes #16 - no more increase in memory usage issue

releasing objects to prevent leaks