![]() |
AW: Datenkopie vom einen Record in ein anderes
Das gibt' s IIRC seit Delphi 2006.
|
AW: Datenkopie vom einen Record in ein anderes
Zitat:
Und dann werden die Felder eines Records nur bei einem gemanagten Typen initialisiert. Und eine Objekt-Instanz ist erst mit ARC gemanaget.
Delphi-Quellcode:
TFoo = record
Instance : TObject; // ohne Zuweisung kann hier alles drin stehen! Str : string; // init mit '' Intf : IInterface; // init mit nil procedure Assign( Other : TFoo ); end; procedure TFoo.Assign( Other : Tfoo ); begin if Assigned( Instance ) then FreeAndNil( Instance ); // das knallt wie ein Zufallsgenerator! Instance := Other.Instance; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:28 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-2025 by Thomas Breitkreuz