clear array

Jonathan M Davis jmdavisProg at gmx.com
Mon Oct 15 17:44:05 PDT 2012


On Tuesday, October 16, 2012 02:37:52 Andrej Mitrovic wrote:
> On 10/16/12, Damian <damianroyday at gmail.com> wrote:
> > Does D have a built-in way to clear arrays dynamic and static?
> 
> clear(arr).
> arr.clear() should work too.

Use destroy, not clear. clear is now an alias for clear and should be going 
away eventually. There were too many problems with the ambiguity of the name
clear, so it was renamed.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list