On Friday, 2 May 2014 at 15:06:59 UTC, Andrei Alexandrescu wrote:
So now it looks like dynamic arrays also can't contain structs with destructors :o). -- Andrei

Well, that's always been the case, and even worst, since in a dynamic array, destructor are guaranteed to *never* be run. Furthermore, given the "append causes relocation which duplicates", you are almost *guaranteed* to leak your destructors. You just can't keep track of the usage of a "naked" dynamic array.

This usually comes as a great surprise to users in ".learn". It's also the reason why using "File[]" never ends well...

Reply via email to