When the ‘bad string’ line in the following code is used I get a big memory leak, but when the ‘good string’ line is used there is no memory leak.
from ROOT import std test = std.string() for n in xrange(int(1e6)): if n % 10000 == 0: print 'entry: ', n #s = 'good string' s = std.string('bad string') test.replace( 0, std.string.npos, s )
Does anyone understand where the memory leak is coming from?
Any help would be greatly appreciated.
PS. I’m running ROOT v5.34/01 with python 2.7.3, gcc 4.01, on osx 10.6.8