use "delete" instead of "free" ( found by "valgrind")