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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,b6c392d1e6028229 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!33g2000pru.googlegroups.com!not-for-mail From: Emmanuel Briot Newsgroups: comp.lang.ada Subject: Re: Memory leak in GNATcoll or false positive from valgrind? Date: Sun, 30 Jan 2011 11:24:20 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <4d43fb20$0$23765$14726298@news.sunsite.dk> NNTP-Posting-Host: 88.181.126.208 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1296415460 15751 127.0.0.1 (30 Jan 2011 19:24:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 30 Jan 2011 19:24:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 33g2000pru.googlegroups.com; posting-host=88.181.126.208; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:16803 Date: 2011-01-30T11:24:20-08:00 List-Id: > So, is this valgrind reporting a false positive, or am I doing something > wrong? Depends on your point of view. You have to somehow call GNATCOLL.SQL.Exec.Free (Database_Connection) if you properly want to release the memory. Or you can setup valgrind so that it ignores this "leak" (not really a leak, just some memory that is automatically freed when the process goes away, but memory usage does not grow up as your program lives).