delete[] fix for valgrind.