CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>>::Release
0x006cd0a0 · 76 bytes · __thiscall
_ZN12CRefCounted1I11IRefCounted20CRefCountServiceBaseILb1E6CRefMTEE7ReleaseEv
Decompiled
undefined (1 param)
/* CRefCounted1<IRefCounted, CRefCountServiceBase<true, CRefMT> >::Release() */
int __thiscall
CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>>::Release
(CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>> *this)
{
CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>> *pCVar1;
int iVar2;
char cVar3;
LOCK();
pCVar1 = this + 8;
iVar2 = *(int *)pCVar1;
*(int *)pCVar1 = *(int *)pCVar1 + -1;
UNLOCK();
if (iVar2 + -1 == 0) {
pCVar1 = this + 4;
cVar3 = (**(code **)(*(int *)(this + 4) + 8))(pCVar1);
if ((cVar3 != '\0') &&
(pCVar1 != (CRefCounted1<IRefCounted,CRefCountServiceBase<true,CRefMT>> *)0x0)) {
(**(code **)(*(int *)(this + 4) + 4))(pCVar1);
return 0;
}
}
return iVar2 + -1;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.