I have a couple of questions about ROOT arrays - after looking over the documentation for quite a while I felt like I still don't have all the answers. - how does the TObjArray know the number of elements in it? It is smart: it doesn't do compression when one of its objects is deleted therefore it allows "holes" in its structure. Does it mean that to get the number of objects in TObjArray one has to calculate this number explicitly by iterating over the collection each time he needs it? - Is it possible to put an existing object into ROOT collection without creating its clone on heap? What happens if a locally defined object has been added to a collection? Is it always necessary to use new? If the answer to the previous quiestion is "yes", it means that collection doesnt' own its objects in a sense that they've been created outside the collection. So what happens then with the objects when collection gets deleted? Who keeps the responsibility for deleting the objects? Thanks a lot, Pasha.
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:21 MET