Ver Mensaje Individual
  #4  
Antiguo 11-07-2008
[coso] coso is offline
Miembro Premium
 
Registrado: may 2008
Ubicación: Girona
Posts: 1.678
Reputación: 0
coso Va por buen camino
Hola, debes liberar los bitmaps al rellamar otra vez al event. Los estas reasignando dejando la memoria anterior bloqueada.

Código Delphi [-]

function FreeImages (ph : PHXBitmap) : boolean;
begin
        result := true;
        try with ph do
            if phxPlay <> nil then phxPlay.Free;
            if  Assigned(phxPlayMove) then phxPlayMove.Free;
             ...
        except
        result := false;
        end;
end;

function GetImages : PHXBitmap;
var
  DllHandle: THandle;
begin
  DllHandle := LoadLibrary('.\phxres\phxres.dll');
  if DllHandle <> 0 then begin
    try
         result.phxPlay:=   LoadBitmap(DllHandle, 'Play');
         result.phxPlayMove:=   LoadBitmap(DllHandle, 'PlayMove');
         result.phxPlayClick:=   LoadBitmap(DllHandle, 'PlayClick');
  ...

  end;
end;

y en el codigo del event

Código Delphi [-]
begin
            ...
            FreeImages(PHX);
            PHX := GetImages;      
            ...
end;

Última edición por coso fecha: 11-07-2008 a las 12:31:52.
Responder Con Cita