template traverse, dtor