[PATCH 2/3] mstask: Forward IPersistFile::AddRef()/Release() to parent object.

Dmitry Timoshkov dmitry at baikal.ru
Thu Apr 26 00:46:49 CDT 2018


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/mstask/task.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c
index 99fcbc4f24..bf8cbae039 100644
--- a/dlls/mstask/task.c
+++ b/dlls/mstask/task.c
@@ -754,22 +754,14 @@ static ULONG WINAPI MSTASK_IPersistFile_AddRef(
         IPersistFile* iface)
 {
     TaskImpl *This = impl_from_IPersistFile(iface);
-    ULONG ref;
-    TRACE("\n");
-    ref = InterlockedIncrement(&This->ref);
-    return ref;
+    return ITask_AddRef(&This->ITask_iface);
 }
 
 static ULONG WINAPI MSTASK_IPersistFile_Release(
         IPersistFile* iface)
 {
     TaskImpl *This = impl_from_IPersistFile(iface);
-    ULONG ref;
-    TRACE("\n");
-    ref = InterlockedDecrement(&This->ref);
-    if (ref == 0)
-        TaskDestructor(This);
-    return ref;
+    return ITask_Release(&This->ITask_iface);
 }
 
 static HRESULT WINAPI MSTASK_IPersistFile_GetClassID(IPersistFile *iface, CLSID *clsid)
-- 
2.16.3




More information about the wine-devel mailing list