Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-03

Jump AfterConstruction method

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joao Morais

Hello,

I have a constructor that, is some circumstances, need to return nil (is part of an OPF framework), after calling the inherited create method. This piece of code works fine with Delphi:

   Destroy;
   Self := nil;
   asm
     MOV     [EBP - $09], EAX // Avoid calling AfterConstruction
     POP     dword ptr fs:[$00000000]
     ADD     ESP, $0C
   end;

What should I do for a FPC platform independent code?

Thanks,

Joao Morais