From 37ae95dfd978bb6dd3b0771808ba87fc77dd4e11 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 26 Apr 2018 13:46:49 +0800 Subject: [PATCH] mstask: Forward IPersistFile::AddRef()/Release() to parent object. Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- 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 99fcbc4f245..bf8cbae039a 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)