Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Brad Abrams on volatile and MemoryBarrier(). Someone sent this to the team and I couldn’t stop myself from reading it.
If you use the double check locking pattern, then most probably you are already aware of the pitfalls in it. Using volatile introduces a performance hit and memory barriers can help you to avoid this. My personal preference is to avoid lazy instantiation if possible.
Comments
- Anonymous
June 16, 2004
The comment has been removed