Commit df9fc895 authored by Bernhard Kölbl's avatar Bernhard Kölbl Committed by Alexandre Julliard

windows.media.speech: Add missing async_void_Release implementation.

parent 6dc873bc
...@@ -93,6 +93,21 @@ ULONG WINAPI async_void_Release( IAsyncAction *iface ) ...@@ -93,6 +93,21 @@ ULONG WINAPI async_void_Release( IAsyncAction *iface )
struct async_void *impl = impl_from_IAsyncAction(iface); struct async_void *impl = impl_from_IAsyncAction(iface);
ULONG ref = InterlockedDecrement(&impl->ref); ULONG ref = InterlockedDecrement(&impl->ref);
TRACE("iface %p, ref %lu.\n", iface, ref); TRACE("iface %p, ref %lu.\n", iface, ref);
if (!ref)
{
IAsyncInfo_Close(&impl->IAsyncInfo_iface);
if (impl->invoker)
IInspectable_Release(impl->invoker);
if (impl->handler && impl->handler != HANDLER_NOT_SET)
IAsyncActionCompletedHandler_Release(impl->handler);
impl->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&impl->cs);
free(impl);
}
return ref; return ref;
} }
...@@ -127,7 +142,7 @@ HRESULT WINAPI async_void_put_Completed( IAsyncAction *iface, IAsyncActionComple ...@@ -127,7 +142,7 @@ HRESULT WINAPI async_void_put_Completed( IAsyncAction *iface, IAsyncActionComple
else if (impl->handler != HANDLER_NOT_SET) else if (impl->handler != HANDLER_NOT_SET)
hr = E_ILLEGAL_DELEGATE_ASSIGNMENT; hr = E_ILLEGAL_DELEGATE_ASSIGNMENT;
/* /*
impl->handler can only be set once with async_operation_put_Completed, impl->handler can only be set once with async_void_put_Completed,
so by default we set a non HANDLER_NOT_SET value, in this case handler. so by default we set a non HANDLER_NOT_SET value, in this case handler.
*/ */
else if ((impl->handler = handler)) else if ((impl->handler = handler))
...@@ -445,6 +460,7 @@ static ULONG WINAPI async_inspectable_Release( IAsyncOperation_IInspectable *ifa ...@@ -445,6 +460,7 @@ static ULONG WINAPI async_inspectable_Release( IAsyncOperation_IInspectable *ifa
if (impl->result) if (impl->result)
IInspectable_Release(impl->result); IInspectable_Release(impl->result);
impl->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&impl->cs); DeleteCriticalSection(&impl->cs);
free(impl); free(impl);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment