On Wed Aug 2 17:46:59 2023 +0000, Gabriel Ivăncescu wrote:
In that case, `unlink_ref` isn't going to work either because it NULLs it out, and that would return a NULL VT_DISPATCH in get_nodeValue, which is not exactly ideal, unless I'm missing something? Probably it would need to be something like:
if(V_VT(v) != VT_DISPATCH) { VariantClear(v); return; } V_VT(v) = VT_EMPTY; if(V_DISPATCH(v)) IDispatch_Release(V_DISPATCH(v));
Basically like VariantClear, except it puts VT_EMPTY first before releasing, what do you think? Actually in this case I should do same with VT_UNKNOWN.
Or I could simplify it to: ```c VARIANT tmp = *v; V_VT(v) = VT_EMPTY; VariantClear(&tmp); ```