![]() |
AW: Delphi 10.1 Berlin
Ist zwar toll, aber sooo oft installiert man ja in der Regel nicht, dass das jetzt das Killer-Feature wäre, auf dem man ständig herumreiten muss ;)
|
AW: Delphi 10.1 Berlin
Beim Delphi DCC32 und DCC64 Compiler ist in Delphi Berlin ist jetzt WEAKREF gesetzt.
Delphi-Quellcode:
Endgegen der Docu:
{$IFDEF WEAKREF}
Hier steht Murks. {$ENDIF} ![]() Gibt es dafür einen Grund bzw. hat ARC in den Windows Compiler schon Einzug gehalten? |
AW: Delphi 10.1 Berlin
Standard-mäßig ist Weak-Ref nicht eingeschaltet..... Wie kommst du drauf? In der
![]() ARC ist bei Win32/64 noch nicht verfügbar. |
AW: Delphi 10.1 Berlin
Zitat:
|
AW: Delphi 10.1 Berlin
Aber muss die nicht auch gesetzt sein, denn ab 10.1 Berlin wird doch
Delphi-Quellcode:
für Interfaces unterstützt.
[weak]
Somit würde ich erwarten, dann WEAKREF und WEAKINTFREF auch unter Windows definiert sind. WEAKINSTREF allerdings nicht. Und genau so isses auch, wie mein Super-Hyper-Wuppdi-Testprogramm zeigt
Delphi-Quellcode:
Fazit: Die Dokumentation ist falsch!
program Project1;
{$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; begin {$IFDEF WEAKREF} WriteLn( 'WEAKREF' ); {$ENDIF} {$IFDEF WEAKINSTREF} WriteLn( 'WEAKINSTREF' ); {$ENDIF} {$IFDEF WEAKINTFREF} WriteLn( 'WEAKINTFREF' ); {$ENDIF} ReadLn; end. |
AW: Delphi 10.1 Berlin
Kleiner Nachtrag: Unter Win32 und win64 ist auch WEAKINTFREF - entgegen der Docu - gesetzt. Bei WEAKINSTREF passt es.
Das ist etwas schade, da man globale gesetzte DEFINE's nicht global UNDEF'en kann. |
AW: Delphi 10.1 Berlin
Zitat:
siehe dazu ![]() |
AW: Delphi 10.1 Berlin
Oder am Beispiel der Compiler Direktive WEAKREF:
Code:
Defined for compilers that can use weak references (the [weak] attribute).
*New* in XE4/iOS FOR COMPILERS.... |
AW: Delphi 10.1 Berlin
Zitat:
Fakt ist, dass unter Win32/Win64 für Interfaces das weak Attribut genutzt werden kann und es auch funktioniert. Also ist es doch nur konsequent, wenn dann auch die Compiler-Direktiven analog zur Funktion gesetzt sind. Oder kriege ich hier jetzt nichts mehr mit? |
AW: Delphi 10.1 Berlin
Die Direktive ist (immer) gesetzt, wenn der Compiler das generell unterstützen kann....
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:48 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