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.