final boolean finalized = VmMagic.isFinalized(object);
if (finalized) {
// Already finalized, we can free it now
currentHeap.free(object);
} else {
final VmClassType vmClass = VmMagic.getObjectType(object);
if (!vmClass.hasFinalizer()) {
// No finalizer, we can free it now
currentHeap.free(object);
} else {
// Mark object for invoke of finalizer on other thread.
helper.atomicChangeObjectColor(object, gcColor, GC_YELLOW);