Zapping a dynamic string
Cecil Ward
cecil at cecilward.com
Tue Jul 4 17:03:24 UTC 2023
On Tuesday, 4 July 2023 at 17:01:42 UTC, Cecil Ward wrote:
> I have a mutable dynamic array of dchar, grown by successively
> appending more and more. When I wish to zap it and hand the
> contents to the GC to be cleaned up, what should I do? What
> happens if I set the .length to zero?
I do want to restart the .length at zero in any case as I’m going
to begin the appending afresh, so I wish to restart from nothing.
More information about the Digitalmars-d-learn
mailing list