Major leaks fixed (test and code). RAutoPool checking.