| 1844 | } |
| 1845 | |
| 1846 | void CScriptArray::Release() const |
| 1847 | { |
| 1848 | // Clearing the GC flag then descrease the counter |
| 1849 | gcFlag = false; |
| 1850 | if( asAtomicDec(refCount) == 0 ) |
| 1851 | { |
| 1852 | // When reaching 0 no more references to this instance |
| 1853 | // exists and the object should be destroyed |
| 1854 | this->~CScriptArray(); |
| 1855 | userFree(const_cast<CScriptArray*>(this)); |
| 1856 | } |
| 1857 | } |
| 1858 | |
| 1859 | // GC behaviour |
| 1860 | int CScriptArray::GetRefCount() |
no test coverage detected