free memory and break tests.