Proper memorymanagement in test program.