Bazaar developer reference

CvDllInterfaceModeInfo::DecrementReference()

Defined in
CvDllInterfaceModeInfo.cpp, line 41
Class
CvDllInterfaceModeInfo
Hook name
CivHooks::CvDllInterfaceModeInfo_DecrementReference

Hooks

static bool BeforeCvDllInterfaceModeInfo_DecrementReference(CvDllInterfaceModeInfo* self, unsigned int& result);static void AfterCvDllInterfaceModeInfo_DecrementReference(CvDllInterfaceModeInfo* self, unsigned int& result);static unsigned int ReplaceCvDllInterfaceModeInfo_DecrementReference(unsigned int (*original)(CvDllInterfaceModeInfo*), CvDllInterfaceModeInfo* self);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllInterfaceModeInfo_DecrementReference::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllInterfaceModeInfo_DecrementReference);host->RegisterHook(host->pluginIndex, CivHooks::CvDllInterfaceModeInfo_DecrementReference::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllInterfaceModeInfo_DecrementReference);host->RegisterHook(host->pluginIndex, CivHooks::CvDllInterfaceModeInfo_DecrementReference::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllInterfaceModeInfo_DecrementReference);

Code

41unsigned int CvDllInterfaceModeInfo::DecrementReference()42{43	if(m_uiRefCount == 1)44	{45		delete this;46		return 0;47	}48	else49	{50		--m_uiRefCount;51		return m_uiRefCount;52	}53}

Called by