Einzelnen Beitrag anzeigen

Der schöne Günther

Registriert seit: 6. Mär 2013
6.110 Beiträge
 
Delphi 10 Seattle Enterprise
 
#23

AW: Interface "überladen" vorhandener Methoden?

  Alt 31. Jan 2014, 17:57
Nja, wenn die Objktreferenzen und die Interfacerferenzen beide mitzählen ... wer hat dann die Kontrolle über die Freigabe des Objekts?
Wenn da keiner aufpasst, müsste doch zwangsläufig der freigeben, welcher zuerst bei 0 ankommt.
Hier noch O-Ton Marco Cantù aus White Paper: The Delphi Language for Mobile Development

Zitat:
In the past, given that interface variable and standard object variables used different memory management models, it was generally suggested to avoid mixing the two approaches (like using an interface and an object variable or parameter to refer to the same object in memory).

With the new ARM compilers with ARC, the reference counting between object and interface variables is unified, so you can mix the two easily. This makes using interfaces more powerful and flexible on Delphi ARC platforms than it is on Delphi non-ARC platforms.
  Mit Zitat antworten Zitat