ole_free(p1)
public
Invokes Release method of Dispatch interface of WIN32OLE object. You should not use this method
because this method exists only for debugging WIN32OLE. The return value is reference counter
of OLE object.
Show source
static VALUE
fole_s_free(VALUE self, VALUE obj)
{
ULONG n = 0;
struct oledata * pole = NULL;
pole = oledata_get_struct(obj);
if(pole->pDispatch) {
if (reference_count(pole) > 0) {
n = OLE_RELEASE(pole->pDispatch);
}
}
return RB_INT2NUM(n);
}