cleanup
add xh_new_ptr