That does not make sense. Destroy is called after the terminate ( or Terminated := True )
Yep, these are all problems in unPrincipal.pas.
But I also see a big problem in Cromis.Scheduler.pas itself (and that's the one causing the RTLEvent call problem).
For instance, there is this in TScheduledEvent.Stop:
{$IFDEF FPC}RTLEventSetEvent{$ELSE}SetEvent{$ENDIF}(@FTermEvent);
Ok, so for FPC the RTLEvents are used.
But in TScheduledEvent.Run() there is this:
FTermEvent := {$IFDEF MSWINDOWS}CreateEvent(nil, False, False, nil){$ELSE} RTLEventCreate{$ENDIF};
Here, RTLEventCreate() is NOT used because FPC on Windows also has MSWINDOWS defined.
There are a lot of these inconsistencies in the Cromis.Scheduler.pas.
All the IFDEFs for WINDOWS, MSWINDOWS and FPC should be examined and fixed.
BIANCO, where did you get the source-code from?
Edit:
Here is another:
{$IFDEF MSWINDOWS}
Windows, Messages,Types,
{$ELSE}
LMessages, LCLType, LCLIntf,
{$ENDIF}
Why wouldn't this be defined as:
{$IFNDEF FPC}
Windows, Messages,Types,
{$ELSE}
LMessages, LCLType, LCLIntf,
{$ENDIF}