| 1762 | } |
| 1763 | |
| 1764 | void CScriptArray::Release() const |
| 1765 | { |
| 1766 | // Clearing the GC flag then descrease the counter |
| 1767 | gcFlag = false; |
| 1768 | if (asAtomicDec(refCount) == 0) { |
| 1769 | // When reaching 0 no more references to this instance |
| 1770 | // exists and the object should be destroyed |
| 1771 | this->~CScriptArray(); |
| 1772 | asFreeMem(const_cast<CScriptArray*>(this)); |
| 1773 | } |
| 1774 | } |
| 1775 | |
| 1776 | // GC behaviour |
| 1777 | std::int32_t CScriptArray::GetRefCount() |
no test coverage detected