Design with appender: good or bad?

Rene Zwanenburg renezwanenburg at gmail.com
Thu Apr 10 07:16:00 PDT 2014


On Thursday, 10 April 2014 at 13:57:26 UTC, Chris wrote:
>
> The funny thing, though, is that after clearing buf
>
> writeln(data1[0]);
>
> still prints "World1". It only changes after I add a new item 
> to buf.

Correct. The memory has not been touched by clear(), it just sets 
it's internal used elements counter to 0. When adding new items 
the old ones will be overwritten.


More information about the Digitalmars-d-learn mailing list