TObjArray function AddAtFree

Eddy Offermann (eddy@puma.rentec.com)
Fri, 14 May 99 16:12:34 EDT


Dear ROOT-ers

I just want to report a problem I had with the TObjArray class.
Suppose you have something like:

TObjArray a();
for (Int_t = 0; i < 100; i++)
{
TString file = .....;
a.AddAtFree(new TObjString(file))
}

This will not give 100 entries in 'a' but
only 100 - 16 (the default size when a is initialized).
Reason is the fact that fLast will only be set after
AddAtAndExpand is called when i = 16.

I guess one is not supposed to use AddAtFree but
Add instead. Maybe AddAtFree can be removed from the
public list ??

Best Regards,
Eddy Offermann