latest
fixing memory leaks and clang warnings