Ver Mensaje Individual
  #5  
Antiguo 18-01-2008
Avatar de xEsk
[xEsk] xEsk is offline
Miembro Premium
 
Registrado: feb 2006
Posts: 454
Reputación: 21
xEsk Va por buen camino
Código Delphi [-]
procedure Twindow_ver_refrigerio.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  FlabelList:=nil;
  FLabelList.Free;
  FLabelList2:=nil;
  FLabelList2.Free;
  FEditList:=nil;
  FEditList.Free;
  FEditList2:=nil;
  FEditList2.Free;
  FLabelList.Destroy;
  FLabelList2.Destroy;
  FEditList.Destroy;
  FEditList2.Destroy;
end;
A mi parecer, no tiene mucho sentido lo que haces aquí:
- Pones a nil antes de hacer Free? Lo normal, seria liberar y después ponerlo a nil, pero para hacer esto, es mejor "FreeAndNil(FlabelList);" por ejemplo.
- El destroy no se usa, hehe... esto te va a provocar un error. De ahí que te explote al cerrar el formulario.

Saludos.
Responder Con Cita