I had set things up so that the tracker hit contained a pointer to the
hit ID object and outfitted its (tracker hit) destructor with a delete
of the hit ID. When I deleted the event, I got a crash which I traced to
trying to delete a hit ID that was not there.
I traced the code that created the root file; all pointers to the hit
ID's were unique, however when tracing the destructor, the pointers in
the root file started repeating themselves. Hence the crash when it
tried to delete an ID that had already been deleted.
I am guessing that, to conserve space(?), root I/O noticed these
identical objects and got rid of them, changing pointers to them to go
to a single copy. I have now modified the code to embed the hit ID's in
the tracker hits, so I don't have to clean up. And no crash.
Is my conclusion on what root I/O is doing correct? How would one do
cleanup in this case if one had to use a pointer to the objects?
Richard
-- Richard Dubois SLD, Stanford Linear Accelerator Center Richard@slac.stanford.edu http://www.slac.stanford.edu/~richard/ 650-926-3824 650-926-2923 (FAX)