Releases an object that was allocated using allocateObjectById or allocateObjectByType.
allocateObjectById
allocateObjectByType