fix(wrapper): in cpp wrapper do not conserve the taken ref of c object when it exists a cpp shared object