[ROOT-5539] Memory leak when using TTree::Draw on a vector<bool> Created: 22/Sep/13 Updated: 23/Oct/18 Resolved: 23/Sep/13
|Affects Version/s:||5.34/00, 6.00.00|
|Reporter:||Philippe Canal||Assignee:||Philippe Canal|
|External issue URL:||http://root.cern.ch/phpBB3/viewtopic.php?t=16990|
Another update. I made an example, creating a TTree with both a vector<int> and a vector<bool> branch containing the same data (takes a little while to run, larger sample makes it easier to see the differences). Next there is one function drawing from the vector<int> and another drawing from the vector<bool>. The macro runs all three sequentially.
My valgrind etc. knowledge isn't good enough to provide set relevant options and get a useful memory usage printout, but if you open up a memory usage graph, it's easy to visually see the difference between the two drawing functions. This should to the trick:
Hopefully someone has some insights to share...
And on a side note, if not using the vector<bool> because of this problem, what would be the compactest container alternative?
|Comment by Philippe Canal [ 23/Sep/13 ]|
Thanks for reporting this issue. It has been fixed in the v5.34 patch branch and the v6 trunk.