| 1827 | } |
| 1828 | |
| 1829 | void CScriptArray::Release() const |
| 1830 | { |
| 1831 | // Clearing the GC flag then descrease the counter |
| 1832 | gcFlag = false; |
| 1833 | if( asAtomicDec(refCount) == 0 ) |
| 1834 | { |
| 1835 | // When reaching 0 no more references to this instance |
| 1836 | // exists and the object should be destroyed |
| 1837 | this->~CScriptArray(); |
| 1838 | userFree(const_cast<CScriptArray*>(this)); |
| 1839 | } |
| 1840 | } |
| 1841 | |
| 1842 | // GC behaviour |
| 1843 | int CScriptArray::GetRefCount() |
no test coverage detected