mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 19:48:03 +00:00
objsel: Remove DLL refcount tracking.
Recent consensus seems to be that this isn't worth the effort.
This commit is contained in:
parent
528fdc783b
commit
39ccd71991
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -23,12 +23,6 @@
|
|||
#include "objidl.h"
|
||||
#include "objsel.h"
|
||||
|
||||
/**********************************************************************
|
||||
* Dll lifetime tracking declaration for objsel.dll
|
||||
*/
|
||||
|
||||
extern LONG dll_refs DECLSPEC_HIDDEN;
|
||||
|
||||
/**********************************************************************
|
||||
* ClassFactory declaration for objsel.dll
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue