add reset() method to prevent memory leaks
fix # of test
[BUGFIX] Prevents memory leaks on static object ($my)

Release resources once the main object goes out of scope.