From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,48c24b3b7b6825bf X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: My XML/Ada code is leaking Date: Wed, 18 May 2011 14:04:50 +0100 Organization: A noiseless patient Spider Message-ID: References: <4dd2e2c0$0$315$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="17728"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1990Tk7YzSOgwGvZaOPJXXtsWnRrEcuuNw=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:/5iHouwp3EgEx4lm/CsBToTizTM= sha1:Vl2c5xf+6qxJurf2BSAwalJd9Os= Xref: g2news2.google.com comp.lang.ada:20265 Date: 2011-05-18T14:04:50+01:00 List-Id: Thomas Løcke writes: > I'm using XML/Ada to build some Atom XML, and while things in general > are going well, I've hit a wall in a part of the code where I need to > build a DOM document from some string XML and add it to a DOM node. > > The problem is basically that my code leaks, and I can't figure out how > to fix it. I've tried this on Mac OS X Snow Leopard both with GCC 4.6.0 & XMLAda from SVN and with GNAT GPL 2010 & its XML/Ada. The leak detector is XCode / Instruments / Leaks, and shows no leaks. Hmm. Leaks looks at the status on a regular basis, every 10 seconds by default, so I added a 'delay 11.0' at the end. I tried adding a deliberate leak and Leaks spotted it. It didn't give me any trace (beyond the address allocated, or perhaps from which the allocation was made). Probably down to my ignorant fumblings! Nevertheless, it looks as though there isn't a leak on the Mac.