check reference number when unref