Ver Mensaje Individual
  #3  
Antiguo 04-08-2005
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

A lo mejor habría que tener en cuenta cierta nota que aparece en la ayuda de Delphi para la función "Assigned":

Cita:
Empezado por Ayuda de Delphi
Assigned can't detect a dangling pointer--that is, one that isn't nil but no longer points to valid data. For example, in the code example for Assigned, Assigned won't detect the fact that P isn't valid.
Y este es el ejemplo a que se refiere:

Código Delphi [-]
var P: Pointer;
 
 begin
   P := nil;
   if Assigned (P) then Writeln ('You won''t see this');
   GetMem(P, 1024);    {P valid}
   FreeMem(P, 1024);    {P no longer valid and still not nil}
   if Assigned (P) then Writeln ('You''ll see this');
 end;
No sé. Me ha parecido conveniente comentarlo por lo que pudiera dar que pensar.
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita