dev+: fix memory leaks