Dalija Prasnikar
One of the topics raised in yesterday’s FreeAndNil debate was using FreeAndNil in multi-threaded code for avoiding access to a dangling reference when multiple threads are accessing and using the same object instance. Problem is… … Read more
2 years ago in Delphi, FreeAndNil, multithreading0
Dalija Prasnikar
This story begins with the FreeAndNil procedure, why its signature could not have a typed var parameter, why we can only pass variables declared as TObject to such procedures, and why the compiler refuses to… … Read more
4 years ago in Delphi, FreeAndNil, Parameters0
Dalija Prasnikar
Delphi 10.4 Sydney brings one small but rather significant change. A change in the signature of the FreeAndNil procedure fromprocedure FreeAndNil(var Obj); inline;toprocedure FreeAndNil(const [ref] Obj: TObject); inline;Wait, const means the variable i… … Read more
5 years ago in Delphi, FreeAndNil, memory management, sydney0