Abusing valgrind to find reference leaks