If i understand this correctly, the flag is set in the monitor creation code, where finalization can not occur. So it kinda looks like a race condition, but in this case these reads/writes do not overlap. Even if they do, and finalization reads m_flags without hasAllocatedMonitors set, that means that no monitor was allocated for the object being finalized. Please correct me if I'm wrong.