🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #511

Re: tList.destroy

#511
From: ullrich
Date: Sat, 09 May 1998 00:00
29 lines
1777 bytes
In article <pacsoftEsnnEB.2nE@netcom.com>,
  pacsoft@netcom.com (Wilhelm Sarasalo) wrote:
>
> A long time ago I looked at the source for tList.Destroy and it didn't
> seem right because it overrode tObject.Destroy, but didn't call it, it
> just called clear that sets count and capacity to 0.
>
> Now I bought a debugging tool called BoundsChecker from NuMega. It
> reported resource leakage where I had tList.create/tList.free pairs.
>
> I modified classes.pas adding inherited destroy to tList.destroy,
> BoundsChecker quit reporting any leakage. Programs didn't change their
> behavior.

    TList descends directly from TObject. TObject's Destroy method
doesn't do anything, so the program behaves the same whether
inherited Destroy is called or not. (The 32 bytes(?) allocated
for _any_ object gets freed by _any_ destructor, and there's
nothing else for TObject.Destroy to do.)

      Evidently BoundsChecker doesn't understand this.

David C. Ullrich



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading
Technical Details
Message-ID: <6j23tc$bjk$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <pacsoftEsnnEB.2nE@netcom.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb0ea,f5046dff2f7b01e1
X-Google-Attributes: gidfb0ea,public
X-Google-Thread: 10baee,f5046dff2f7b01e1
X-Google-Attributes: gid10baee,public
From: ullrich@math.okstate.edu
Subject: Re: tList.destroy
Date: 1998/05/09
Message-ID: <6j23tc$bjk$1@nnrp1.dejanews.com>
X-Deja-AN: 351748037
References: <pacsoftEsnnEB.2nE@netcom.com>
X-Http-User-Agent: Mozilla/2.02Gold (Win95; I)
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Sat May 09 17:31:24 1998 GMT
Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.vcl.components.using