Clear-up heap allocations to silence valgrind.