It's complex. Assuming that it's always called from the same thread, things should be just fine.
Otherwise you might get leaks due to excessive thread local storage that isn't freed properly. Best is to compile with `-d:useMalloc` and ask Valgrind about it.
