Ver Mensaje Individual
  #6  
Antiguo 28-08-2013
beginner01 beginner01 is offline
Miembro
NULL
 
Registrado: mar 2011
Ubicación: República Dominicana
Posts: 181
Reputación: 14
beginner01 Va por buen camino
Hola.

El "Access Violation" que te salta al cerrar la aplicación es por los TLabel que tienes que estas liberando su Parent primero
y por ende este los libera y cuando intentas liberarlos tu ya sus referencias no son válidas. En tu caso se resuelve poniendo
los Tlabel de primero en el orden, así se liberan ellos y luego sus Parent.


Código Delphi [-]
procedure TMiPanelDiary.AutoDestroy;
begin

     FTexto1.Free;
     FTexto2.Free;
     FClock.Free;
     FClock.FFontClock.Free;
     FDay.FFontDay.Free;
     FDayExt.FFontDayExt.Free;
     FMonth.FFontMonth.Free;
     FStation.FFontStation.Free;
     FWeeksDays.FFontWeekDays.Free;
     FYear.FFontYear.Free;
     FPanelNotice.Free;
     FPanelStation.Free;
     FPanelDayExt.Free;
     FPanelDayX.Free;
     FPanelMonth.Free;
     FPanelYear.Free;
     FPanelWeeksDay.Free;
     FPanelClock.Free;
     FMyTimer.free;

end;

Nota: Otra opción, es permitir que sea el Owner de estos controles el que los libere, ya que se los estás asignando.
Responder Con Cita