added explicit garbage collection directives