comp.lang.ada
 help / color / mirror / Atom feed
From: "Thomas Løcke" <tl@ada-dk.org>
Subject: My XML/Ada code is leaking
Date: Tue, 17 May 2011 23:04:24 +0200
Date: 2011-05-17T23:04:24+02:00	[thread overview]
Message-ID: <4dd2e2c0$0$315$14726298@news.sunsite.dk> (raw)

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



             reply	other threads:[~2011-05-17 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 21:04 Thomas Løcke [this message]
2011-05-18 12:11 ` My XML/Ada code is leaking [SOLVED] Thomas Løcke
2011-05-18 13:04 ` My XML/Ada code is leaking Simon Wright
2011-05-18 13:15   ` Thomas Løcke
2011-05-18 14:20     ` Georg Bauhaus
2011-05-18 19:01       ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox