| 1950 | } |
| 1951 | |
| 1952 | void CScriptArray::Release() const |
| 1953 | { |
| 1954 | // Clearing the GC flag then descrease the counter |
| 1955 | gcFlag = false; |
| 1956 | if( asAtomicDec(refCount) == 0 ) |
| 1957 | { |
| 1958 | // When reaching 0 no more references to this instance |
| 1959 | // exists and the object should be destroyed |
| 1960 | this->~CScriptArray(); |
| 1961 | userFree(const_cast<CScriptArray*>(this)); |
| 1962 | } |
| 1963 | } |
| 1964 | |
| 1965 | // GC behaviour |
| 1966 | int CScriptArray::GetRefCount() |
no test coverage detected