Can someone explain the following: TCanvas xxx("xxx", "Canvas x"); TPad* yyy=new TPad("yyy", "Pad y", 0, 0, 1, 1); xxx.cd(); yyy->Draw(); xxx.Clear() delete yyy; results in a segmentation violation. My understanding of TPad is that the Clear() method should perform the inverse function of draw i.e. in this case, it should remove TPad *yyy from the list of primitives kept by xxx. Thus, it should be safe to delete or redraw *yyy once it has been Cleared from its parent. This doesn't seem to be the case. Are the primitives deleted when they're Cleared? This brings up a related question of who owns the graphical primitives once they have been Drawn. I haven't seen any discussion of this anywhere in the (www) root documentation. Ciao, John
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:34 MET