Re: Zapping a dynamic string

2023-07-04 Thread Cecil Ward via Digitalmars-d-learn
On Tuesday, 4 July 2023 at 17:46:22 UTC, Steven Schveighoffer wrote: On 7/4/23 1:01 PM, 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

Re: Zapping a dynamic string

2023-07-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/4/23 1:01 PM, 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? If you want to forget it so the GC

Re: Zapping a dynamic string

2023-07-04 Thread Cecil Ward via Digitalmars-d-learn
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