![]() |
FreeAndNil Debate: Thread Safety
One of the topics raised in yesterday's FreeAndNil debate was using FreeAndNil inmulti-threaded code for avoiding access to a dangling reference when multiplethreads are accessing and using the same object instance.Problem is that FreeAndNil is not thread-safe and cannot be used to achievethread safety. You cannot call FreeAndNil on a shared object reference in one thread andthen use if
![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:52 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz