Commit 39ccd719 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

objsel: Remove DLL refcount tracking.

Recent consensus seems to be that this isn't worth the effort.
parent 528fdc78
......@@ -66,20 +66,12 @@ static HRESULT WINAPI OBJSEL_IClassFactory_QueryInterface(
static ULONG WINAPI OBJSEL_IClassFactory_AddRef(LPCLASSFACTORY iface)
{
ClassFactoryImpl *This = impl_from_IClassFactory(iface);
ULONG ref;
TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedIncrement(&This->ref);
if (ref == 1)
{
InterlockedIncrement(&dll_refs);
}
return ref;
return InterlockedIncrement(&This->ref);
}
......@@ -89,20 +81,12 @@ static ULONG WINAPI OBJSEL_IClassFactory_AddRef(LPCLASSFACTORY iface)
static ULONG WINAPI OBJSEL_IClassFactory_Release(LPCLASSFACTORY iface)
{
ClassFactoryImpl *This = impl_from_IClassFactory(iface);
ULONG ref;
TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedDecrement(&This->ref);
if (ref == 0)
{
InterlockedDecrement(&dll_refs);
}
return ref;
return InterlockedDecrement(&This->ref);
}
......
......@@ -24,8 +24,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(objsel);
LONG dll_refs = 0;
/***********************************************************************
* DllGetClassObject (OBJSEL.@)
*/
......@@ -43,15 +41,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
}
/***********************************************************************
* DllCanUnloadNow (OBJSEL.@)
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
return dll_refs != 0 ? S_FALSE : S_OK;
}
/**********************************************************************
* OBJSEL_IDsObjectPicker_Destroy (also IUnknown)
*/
......@@ -74,20 +63,12 @@ static inline IDsObjectPickerImpl *impl_from_IDsObjectPicker(IDsObjectPicker *if
static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface)
{
IDsObjectPickerImpl *This = impl_from_IDsObjectPicker(iface);
ULONG ref;
TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedIncrement(&This->ref);
if (ref == 1)
{
InterlockedIncrement(&dll_refs);
}
return ref;
return InterlockedIncrement(&This->ref);
}
......@@ -106,10 +87,7 @@ static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker * iface)
ref = InterlockedDecrement(&This->ref);
if (ref == 0)
{
InterlockedDecrement(&dll_refs);
OBJSEL_IDsObjectPicker_Destroy(This);
}
return ref;
}
......
......@@ -24,12 +24,6 @@
#include "objsel.h"
/**********************************************************************
* Dll lifetime tracking declaration for objsel.dll
*/
extern LONG dll_refs DECLSPEC_HIDDEN;
/**********************************************************************
* ClassFactory declaration for objsel.dll
*/
typedef struct
......
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