Jump to content
Registration disabled at the moment Read more... ×

Leaderboard


Popular Content

Showing content with the highest reputation on 07/30/25 in all areas

  1. Angus Robertson

    if Obj <> nil then Obj.Free

    In general, ICS does use FreeAndNil for new code, if not nilled in code, the nil being the important part, since double Free without nil does cause an exception. Double free is common, due to the complex inheritance of many ICS components. But I simply don't have the time to clean up code written up to 25 years ago, unless I'm updating that code for other reasons. It all needs testing afterwards, and often correction when it then fails to compile on older versions of Delphi... Angus
  2. Wow, I hated the ternary operator in every language I encountered so far. But this one with pascal keywords seems almost bearable. But, I'm sure it will bring all sorts of new anti-patterns to Delphi. And I don't think a language saddled with 'with' needs any more anti-patterns.
  3. gkobler

    wuppdi Welcome Page for Delphi 11 Alexandria?

    New Version is available. V 1.2.2.B44 for x86 and x64 D12.x New Option
  4. Anders Melander

    if Obj <> nil then Obj.Free

    Delphi 1 ; procedure TObject.Free ObjectFree: MOV BX,SP LES DI,SS:[BX+4] MOV AX,ES OR AX,DI JE @@1 MOV AL,1 PUSH AX PUSH ES PUSH DI LES DI,ES:[DI] CALL ES:[DI].vtDestroy @@1: RETF 4 Delphi 2 procedure TObject.Free; asm TEST EAX,EAX JE @@exit MOV ECX,[EAX] MOV DL,1 CALL dword ptr [ECX].vtDestroy @@exit: end;
  5. EugeneK

    if Obj <> nil then Obj.Free

    Free on nil works in Delphi 7 as well.
  6. gkobler

    wuppdi Welcome Page for Delphi 11 Alexandria?

    New Version is available. V 1.2.1.B42 for x86 and x64 D12.x Now you can adjust the behavior
×