Added more memory management tests.