Ver Mensaje Individual
  #1  
Antiguo 06-04-2011
Avatar de GerTorresM
GerTorresM GerTorresM is offline
Miembro
 
Registrado: nov 2005
Ubicación: Tunja - Boyacá
Posts: 210
Reputación: 19
GerTorresM Va por buen camino
Question FreeAndNil VS Free

Hola a tod@s:

Bien la duda que me asalta el día de hoy es la siguiente:

cual es la función mas indicada para destruir un objeto para este caso un formulario

Código Delphi [-]
procedure TFMenuPrincipal.ANovedadesExecute(Sender: TObject);
Var FNovedades_temporal : TFNovedades;
begin
  try
    FNovedades_temporal:= TFNovedades.Create(self);
    FNovedades_temporal.ShowModal;
  finally
    FNovedades_temporal.Free;
  end;
end;

o

Código Delphi [-]
procedure TFMenuPrincipal.ANovedadesExecute(Sender: TObject);
Var FNovedades_temporal : TFNovedades;
begin
  try
    FNovedades_temporal:= TFNovedades.Create(self);
    FNovedades_temporal.ShowModal;
  finally
    FreeAndNil(FNovedades_temporal);
  end;
end;
y muy en concreto cual es la diferencia entre las dos funciones


Agradezco de antemano



gertorresm
Colombia
Responder Con Cita