At 13:16 30/04/2004 +0200, Miguel wrote:
Egon wrote:
if (atomCount == 0) {
if (tokenCount > atomArray.length)
atomArray = new Atom[tokenCount];
for (int i = tokenCount; --i >= 0; )
atomArray[i] = new Atom();
atomCount = tokenCount;
}
This is what I would naturally write
Egon wrote:
>> The atom values themselves don't get reused. But the array which holds
>> them can be reused.
>
> Ok, but what I do not have clear yet, is what happens when doing this:
> - say you have an array of length 10 all with Atom set to some value
> - then you need to enlarge... I guess new