fix memleak under clang++