Release all memory in tests