What “memory problem”?
When running “valgrind” with ROOT, you should use:
valgrind --suppressions=`root-config --etcdir`/valgrind-root.supp ...
BTW. Please read the “Tips for Efficient and Successful Posting” and the “Posting code? Read this first!”.