How to cleanup array of structs?

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 4 05:24:44 PDT 2017


> // Will reuse the array, overwriting existing data.
> // If other parts of the program are using existing data
> // in the array, this will lead to hard-to-track-down bugs.
> mytracks.length = 0;
> mytracks.assumeSafeAppend();

Could you give an example where it can lead bugs? Do you mean 
multi-thread apps?


More information about the Digitalmars-d-learn mailing list