Subject: Re: GDI Objects creeping up From: Camille Kater Date: Thu, 5 May 2016 09:52:42 +0200 Message-ID: <1462429025_1@vo.lu> References: Lines: 50 NNTP-Posting-Host: 83.99.28.240 Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news.vo.lu!not-for-mail Newsgroups: comp.lang.clipper.visual-objects X-Trace: vo.lu 1462429025 83.99.28.240 (5 May 2016 08:17:05 0200) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Xref: csiph.com comp.lang.clipper.visual-objects:9327 Hi Jamal, In the auto-generated init() method of the painted class you will often find the following code: example: Method init(oWindow,iCtlID,oServer,uExtra) CLASS MyWindow LOCAL DIM aFonts[3] AS OBJECT LOCAL DIM aBrushes[1] AS OBJECT SELF:PreInit(oWindow,iCtlID,oServer,uExtra) SUPER:Init(oWindow,ResourceID{"MyWindow",_GetInst()},iCtlID) aFonts[1] := Font{,8,"MS Sans Serif"} aFonts[1]:Bold := TRUE aFonts[2] := Font{,8,"Microsoft Sans Serif"} aFonts[2]:Bold := TRUE aFonts[3] := Font{,10,"Microsoft Sans Serif"} aFonts[3]:Bold := TRUE aBrushes[1] := Brush{Color{157,191,255}} .... My understanding is: As you deal here with arrays, they go out of scope upon closing this class. Camille On 05/05/16 03:34, Jamal Assaf wrote: > Hi Benito, > > I have not read any posts that DIM itself make objects go out of scope > upon returning from a method. May be you could point out where you read > this info.