29 Aug
2023
29 Aug
'23
5:19 p.m.
Jeffrey Smith (@whydoubt) commented about dlls/mmdevapi/devicetopology.c:
+static ULONG WINAPI DT_AddRef(IDeviceTopology *iface) +{ + struct device_topology *This = impl_from_IDeviceTopology(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("(%p) new ref %lu\n", This, ref); + return ref; +} + +static ULONG WINAPI DT_Release(IDeviceTopology *iface) +{ + struct device_topology *This = impl_from_IDeviceTopology(iface); + ULONG ref = InterlockedDecrement(&This->ref); + TRACE("(%p) new ref %lu\n", This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This);
free(This);
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3554#note_43691