From MAILER-DAEMON Fri May 02 08:47:46 2008
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Jrufy-0000T8-NE
	for mharc-bug-plotutils@gnu.org; Fri, 02 May 2008 08:47:46 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Jratq-0002Vz-GC
	for bug-plotutils@gnu.org; Thu, 01 May 2008 11:40:46 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Jratn-0002SR-Mm
	for bug-plotutils@gnu.org; Thu, 01 May 2008 11:40:46 -0400
Received: from [199.232.76.173] (port=56304 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Jratn-0002S7-Gh
	for bug-plotutils@gnu.org; Thu, 01 May 2008 11:40:43 -0400
Received: from fg-out-1718.google.com ([72.14.220.158])
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <graboluk@gmail.com>) id 1Jratn-0003LW-3n
	for bug-plotutils@gnu.org; Thu, 01 May 2008 11:40:43 -0400
Received: by fg-out-1718.google.com with SMTP id 13so930860fge.30
	for <bug-plotutils@gnu.org>; Thu, 01 May 2008 08:40:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:date:from:to:subject:message-id:x-mailer:mime-version:content-type:content-transfer-encoding:sender;
	bh=SZOOlgtYm7b5vE7JlSzD1SQ63EBweiUPe0cj2SpgEWA=;
	b=lQF/TAfmeo9j4oTaE/HEI4pMFqnKqK9MkVIqVV/Q+X84mkiFGZpPWf8kHq2nDpv5asKQcxIuWWDyTcxgzbtko07Ni3rWrSkrAxKhYQCuqiwW8kQzLVHC5L9nNnltLHDk8rpY4XasYim08rvsqsaztDBbu79BXMbVhQ+U3cqtZms=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=date:from:to:subject:message-id:x-mailer:mime-version:content-type:content-transfer-encoding:sender;
	b=t/RLUwS7LM9hOoXSQVNV4b6MrAeugP0wUEee9kE00d+59v+64SgFORSS3hZM4x8O2X62H1y9A//AZJKNrqbLx5iHDxDoRHf6zqa1iHtXygspz0C+OkmUYnVNYz5ynYgS+nyf2SM268ArquVaAiq12T85g/mc5kXXW7hW1YWMb1Y=
Received: by 10.86.53.8 with SMTP id b8mr1472322fga.32.1209656440805;
	Thu, 01 May 2008 08:40:40 -0700 (PDT)
Received: from rokkanon.marmurowa.hopto.org ( [83.21.74.82])
	by mx.google.com with ESMTPS id b17sm3275434fka.6.2008.05.01.08.40.37
	(version=SSLv3 cipher=OTHER); Thu, 01 May 2008 08:40:39 -0700 (PDT)
Date: Thu, 1 May 2008 17:36:59 +0200
From: Lukasz Grabowski <lgrabowski@students.mimuw.edu.pl>
To: bug-plotutils@gnu.org
Message-ID: <20080501173659.7cb49dbf@rokkanon.marmurowa.hopto.org>
X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: Lukasz Grabowski <graboluk@gmail.com>
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)
X-Mailman-Approved-At: Fri, 02 May 2008 08:47:45 -0400
Subject: [Bug-plotutils] memory leaks when using libplotter
X-BeenThere: bug-plotutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports for the GNU plotting utilities,
	including the libplot graphics export library."
	<bug-plotutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-plotutils>,
	<mailto:bug-plotutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-plotutils>
List-Post: <mailto:bug-plotutils@gnu.org>
List-Help: <mailto:bug-plotutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-plotutils>,
	<mailto:bug-plotutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 15:40:46 -0000

Hi, the following code grows up to 5% of memory of my 512Mb laptop:

#include <plotter.h>

int main() {
	XPlotter ploter(cin, cout, cerr);
	ploter.openpl();
	ploter.fspace (0, 0, 10, 10);
	for(int i=0;i<100000;i++){
		ploter.fontsize(20);
		usleep(10);
	}
	ploter.closepl();
	cin.get();
	return 1;
}

The same happens when using double buffering, which makes longer
animations that change parameters (fontsize, pencolor, etc...)
impossible with libplotter:

#include <plotter.h>

int main() {
	XPlotter ploter(cin, cout, cerr);
	ploter.parampl("USE_DOUBLE_BUFFERING", (void*) "yes");
	ploter.openpl();
	ploter.fspace (0, 0, 10, 10);
	for(int i=0;i<100000;i++){
		ploter.fontsize(20);
		ploter.erase();
		usleep(10);
	}
	ploter.closepl();
	cin.get();
	return 1;
}

Best regards,
Lukasz Grabowski



