Add __del__ back to keep the API the same as java/python