[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch: remove redundant loop in StringBuffer
From: |
Anthony Green |
Subject: |
Re: Patch: remove redundant loop in StringBuffer |
Date: |
Tue, 24 Feb 2004 08:32:09 -0800 |
On Tue, 2004-02-24 at 08:17, Tom Tromey wrote:
> I think the loop is still needed for the case where you resize the
> StringBuffer but the underlying array is not resized. For instance,
> you might fill in the buffer, shrink it, then regrow it. In this
> case, don't we need the newly visible slots to be \0 instead of
> whatever appeared in them earlier?
No, I don't think so. That's what I meant in my comment by "No part of
StringBuffer depends on padding out the rest of the StringBuffer with
'\0'". I looked through the code and couldn't find where this would
matter.
AG
--
Anthony Green <address@hidden>
Red Hat, Inc.