Re: Another shitty example of exceptions
From: Skybuck Flying (nospam_at_hotmail.com)
Date: 04/07/04
- Next message: Skybuck Flying: "Re: and another shitty exception example :)..."
- Previous message: J French: "Re: beginner with delphi"
- In reply to: Nicholas Sherlock: "Re: Another shitty example of exceptions"
- Next in thread: Maarten Wiltink: "Re: Another shitty example of exceptions"
- Reply: Maarten Wiltink: "Re: Another shitty example of exceptions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 7 Apr 2004 12:22:34 +0200
"Nicholas Sherlock" <n_sherlock@hotmail.com> wrote in message
news:c4v67d$s5i$1@lust.ihug.co.nz...
> Skybuck Flying wrote:
> > So the safest thing to do would be:
> >
> > finally
> > if D<> nil then D.Free;
> > if C<> nil then C.Free;
> > if B<> nil then B.Free;
> > if A<> nil then A.Free;
> > end;
>
> No, that's a waste of time, since that's just about the first thing that
> d.free (etc) do ( if self=nil then exit). That's why we use free and not
> destroy.
.Free could only work if it was a class method ?
Since calling a method is only valid if the instance of the class exists...
otherwise one would normally get an access violation ?!
So I don't understand why it is valid to call .Free on a nil reference ?
- Next message: Skybuck Flying: "Re: and another shitty exception example :)..."
- Previous message: J French: "Re: beginner with delphi"
- In reply to: Nicholas Sherlock: "Re: Another shitty example of exceptions"
- Next in thread: Maarten Wiltink: "Re: Another shitty example of exceptions"
- Reply: Maarten Wiltink: "Re: Another shitty example of exceptions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]