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,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Tue, 17 May 2011 23:04:24 +0200 From: =?ISO-8859-1?Q?Thomas_L=F8cke?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110501 Thunderbird/3.1.10 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: My XML/Ada code is leaking Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <4dd2e2c0$0$315$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 83.91.213.86 X-Trace: news.sunsite.dk DXC=CkbeO6\dAX=RV[Kf06ReB9YSB=nbEKnk;=AVko68W^183ZOKe3?:>X1DZkco8YM<=;U`JRC]IM5=5ZIi8;:aH4c? X-Complaints-To: staff@sunsite.dk Xref: g2news2.google.com comp.lang.ada:20260 Date: 2011-05-17T23:04:24+02:00 List-Id: Hey all, 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 made this small example that show the exact problem: http://pastebin.com/a8t0tAC2 When I execute the program using this: valgrind -v --leak-check=full --track-origins=yes foobar I get a leak looking like this: ==18942== LEAK SUMMARY: ==18942== definitely lost: 144 bytes in 1 blocks The amount of bytes obviously goes up if more Create_Element calls are made. If there are any XML/Ada experts out there, please feel free to point me in the right direction, because I'm at my wits end with this one. The compiler used is GNAT GPL 2010 on Slackware 13.37 x86_64. Valgrind is version 3.6.1, in case that matters. :o) -- Thomas L�cke Email: tl at ada-dk.org Web: http//:ada-dk.org http://identi.ca/thomaslocke