#46 fix memory leaks in dmt-test