//
// cocos2d::CCPoolManager::finalize from 0x180007740 to 0x1800077a1 (97 bytes)
//
// 6 xrefs:
// > cocos2d::CCPoolManager::~CCPoolManager @ 0x180007549
// > cocos2d::CCPoolManager::purgePoolManager @ 0x180007855
// > ??> @ 0x18013a610
// > ??> @ 0x18013a620
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b7a98
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:21:18 +0000
//
void __fastcall cocos2d::CCPoolManager::finalize(cocos2d::CCArray **this)
{
unsigned int *v2; // rbx
__int64 v3; // rax
cocos2d::CCAutoreleasePool **v4; // rbx
cocos2d::CCAutoreleasePool **i; // rdi
if ( (unsigned int)cocos2d::CCArray::count(*this) )
{
if ( *this )
{
v2 = *((unsigned int **)*this + 7);
v3 = *v2;
if ( (_DWORD)v3 )
{
v4 = *((cocos2d::CCAutoreleasePool ***)v2 + 2);
for ( i = &v4[v3 - 1]; v4 <= i; ++v4 )
{
if ( !*v4 )
break;
cocos2d::CCAutoreleasePool::clear(*v4);
}
}
}
}
}