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
Weiterlesen...