Memory management ready for tests.