Skip to content

Keeping alive objects when they're drawn to a TCanvas #120

Closed
pwaller opened this Issue Dec 9, 2012 · 1 comment

1 participant

@pwaller
the rootpy project member
pwaller commented Dec 9, 2012

It's possible to keep a global weakref dictionary where the key is the object whose lifetime needs to be watched, and the values are objects to keep alive.

We can use this to hook Draw() methods and ensure that things which are drawn are kept alive as long as the canvas(es) they're drawn to.

This same technique could also be used for a TTree's internal buffers, and in other places.

@pwaller
the rootpy project member
pwaller commented Feb 21, 2013

@ndawe I think this counts as done for now. You may want to open up a new issue if you think this could apply to the TTree buffers.

@pwaller pwaller closed this Feb 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.