This shows you the differences between two versions of the page.
root:ownershippyroot [2011/06/18 12:12] – created decianm | root:ownershippyroot [2011/06/18 12:13] (current) – decianm | ||
---|---|---|---|
Line 10: | Line 10: | ||
canv = TCanvas(" | canv = TCanvas(" | ||
</ | </ | ||
+ | |||
+ | To avoid this, you can tell python not to take ownership of these objects: | ||
+ | <code python> | ||
+ | from ROOT import * | ||
+ | import ROOT | ||
+ | |||
+ | for i in range(0, | ||
+ | canv = TCanvas(" | ||
+ | ROOT.SetOwnership(canv, | ||
+ | </ | ||
+ | |||
+ | will give you 10 canvases after having executed this script. | ||