I tried everything
Uninstallation, 32 / 64bit, debugger,..
(I also tried it on a Win Vista 32-bit computer)
In linux it works, but in Windows ...
I eventually found a compromise
I tried to find an alternative solution for the memory leak that depended on the lack call of Thread.Start (= no destroy).
If you find interesting:
(A)
in class TuosPlayer add var "isExecute: Boolean;"
in Tuos_Player.Create add "isExecute:= False;"
in Tuos_Player.Execute add for first:
if isExecute then
Exit //not can call execute again
else
isExecute:= True;
(B) modified method
Procedure Tuos_Player.FreePlayer();
begin
if (isAssigned = True) then
begin
if isExecute then
begin
NoFree:= False;
RTLeventSetEvent(evPause);
Status:= 0;
end
//if the thread has not been started..
else
begin
//..force the immediate termination to destroy
isExecute:= True;
Start;
end;
end;
end;
I tested different combinations and it seems to work (no crash, no memory leak).
As an added also solves my problem (mystery crash) with the "play () stop () (Tuos_Player.FreePlayer())" consecutive.
> Did you try the exe that I sent you by mail ?
> If yes, do you have problem too with it ?
it works perfectly, Thanks (also my compiled works, but crash if you run it through lazarus: so I do not feel safe)