Memory leak of TCanvas->SaveAs in a daemon process

From: OKUMURA, Akira <oxon_at_icrr.u-tokyo.ac.jp>
Date: Tue, 18 Sep 2007 10:43:49 -1000


Hello ROOTers,

The line
56: can->SaveAs("tmp.png");
in "test2.cxx" causes a memory leak if I run the program as a daemon process on SL 4.4. You can see that heap memories are deleted in the end of while loop in the code. But memory leaks happen.

$ cd /home/foo
$ ls

testd test2.cxx
$ g++ -c -o test2.o test2.cxx `root-config --cflags`
$ g++ -o test2 test2.o `root-config --glibss`
$ su

# mv testd /etc/init.d
# /sbin/service testd start

Starting test2:                        [  OK  ]
# exit
$ PID=`pgrep test2` top -p $PID

You will see the used memory increase. How can I eliminate this problem?

Sincerely

OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
Institute for Cosmic Ray Research, University of Tokyo 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan Phone/Fax : +81 4-7136-3153
Skype : okumura.akira

Received on Tue Sep 18 2007 - 22:45:16 CEST

This archive was generated by hypermail 2.2.0 : Wed Sep 19 2007 - 11:50:02 CEST