From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1G8IUO-0005ng-0G for garchives@archives.gentoo.org; Wed, 02 Aug 2006 15:18:28 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k72FGONT019262; Wed, 2 Aug 2006 15:16:24 GMT Received: from ms-smtp-04.southeast.rr.com (ms-smtp-04.southeast.rr.com [24.25.9.103]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k72FEKBB032706 for ; Wed, 2 Aug 2006 15:14:20 GMT Received: from [10.20.31.251] (cpe-066-057-226-032.nc.res.rr.com [66.57.226.32]) by ms-smtp-04.southeast.rr.com (8.13.6/8.13.6) with ESMTP id k72FEIh8015533 for ; Wed, 2 Aug 2006 11:14:19 -0400 (EDT) Message-ID: <44D0C144.4090405@electronsweatshop.com> Date: Wed, 02 Aug 2006 11:14:12 -0400 From: Randy Barlow User-Agent: Thunderbird 1.5.0.5 (X11/20060801) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] memory leak with gtk+-2.8.20-r1 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Archives-Salt: 02bb03db-6535-4bfd-be77-052902ea7ce6 X-Archives-Hash: 9b2de5462d4745a56ec4aaea4258ff14 gwe wrote: > Hello, > I use gtk+ for my soft's graphic interface. > But valgrind make an log file containing approximately 22700 lines for an > simple source code like : > #include > > int main(int argc, char **argv) { > gtk_init(&argc, &argv); > GtkWidget *win= gtk_window_new(GTK_WINDOW_TOPLEVEL); > g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(gtk_main_quit), NULL); > gtk_widget_show_all(win); > gtk_main(); > return EXIT_SUCCESS; > } For one, you didn't delete the dynamic memory you allocated when you were finished with it. Before EXIT_SUCCESS, add: delete win; R -- gentoo-user@gentoo.org mailing list