Memory cleaning test, implementation and javaDoc amendment