As I understand this: It may sometimes well be necessary to write your own
destructor to clean up. But if you do this, don't call it foo; call it
destructor and override it: destructor destroy; override;
In your own destructor method, don't forget to call inherited in the end.
--
View this me
On Tue, 24 Jan 2017 15:33:30 +0100
Maciej Izak wrote:
> 2017-01-24 12:48 GMT+01:00 Mattias Gaertner :
>
> > fpc allows to declare a method with the destructor keyword, that is
> > not a real destructor, because it does not free the memory. For what is
> > this feature good for?
> >
>
> with t
2017-01-24 12:48 GMT+01:00 Mattias Gaertner :
> fpc allows to declare a method with the destructor keyword, that is
> not a real destructor, because it does not free the memory. For what is
> this feature good for?
>
with trunk works as expected (Foo does call FreeInstance).
--
Best regards,
Ma
Michael Van Canneyt wrote:
> On Thu, 20 Sep 2007, David Mears wrote:
>
>
>> from fpc/packages/fcl-base/src/inc/zstream.pp
>>
>> I'm not really sure why this is in the destructor for tdecompressionstream.
>>
>> if FZRec.avail_in <> 0 then
>> Source.Seek(-FZRec.i, soFromCurrent);
>>
>
>
On Thu, 20 Sep 2007, David Mears wrote:
> from fpc/packages/fcl-base/src/inc/zstream.pp
>
> I'm not really sure why this is in the destructor for tdecompressionstream.
>
> if FZRec.avail_in <> 0 then
> Source.Seek(-FZRec.avail_in, soFromCurrent);
To reposition the source stream on the l