//
// cocos2d::CCString::~CCString from 0x18000fed0 to 0x18000ff65 (149 bytes)
//
// 4 xrefs:
// > sub_18000FFB0 @ 0x18001000b
// > sub_18000FFB0 @ 0x18000ffcc
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ae080
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCString::~CCString(cocos2d::CCString *this)
{
std::string *p_m_sString; // rax
std::size_t m_capacity; // rdx
char *m_bigStorage; // rcx
this->__vftable = (cocos2d::CCString_vtbl *)&cocos2d::CCString::`vftable';
p_m_sString = &this->m_sString;
this->m_sString.m_data.m_size = 0;
if ( this->m_sString.m_data.m_capacity > 0xF )
p_m_sString = (std::string *)this->m_sString.m_data.m_bigStorage;
p_m_sString->m_data.m_smallStorage._Elems[0] = 0;
m_capacity = this->m_sString.m_data.m_capacity;
if ( m_capacity > 0xF )
{
m_bigStorage = this->m_sString.m_data.m_bigStorage;
if ( m_capacity + 1 >= 0x1000 )
{
if ( (unsigned __int64)&m_bigStorage[-*((_QWORD *)m_bigStorage - 1) - 8] > 0x1F )
invalid_parameter_noinfo_noreturn();
m_bigStorage = *((char **)m_bigStorage - 1);
}
j_j_free_0(m_bigStorage);
}
this->m_sString.m_data.m_size = 0;
this->m_sString.m_data.m_capacity = 15;
this->m_sString.m_data.m_smallStorage._Elems[0] = 0;
cocos2d::CCObject::~CCObject(this);
}