Created
May 29, 2018 06:19
-
-
Save RoryDungan/4c24b1b3c35f5e03f3083cf6948fcab0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void DereferenceManagedObject(int32_t handle) | |
{ | |
assert(handle >= 0 && handle < managedObjectsRefCountLen); | |
if (handle != 0) | |
{ | |
auto numRemain = --managedObjectRefCounts[handle]; | |
assert(numRemain >= 0); | |
if (numRemain <= 0) | |
{ | |
ReleaseObject(handle); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment