https://issues.dlang.org/show_bug.cgi?id=17897
Richard Cattermole <alphaglosi...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #3 from Richard Cattermole <alphaglosi...@gmail.com> --- (In reply to Steven Schveighoffer from comment #2) > Sorry, I didn't mean to commit so early. > > A postblit is not called for a move, which is done for rvalues being sent > into a function: snip Except this isn't just a move. No, the number of destructor calls must be equal to the number of constructor/postblit calls. Otherwise reference counting types are not going to work. Postblit must be called in the given example. Count: 1 - create Count: 1 - fun call Count: 0 - destructor (deallocate memory) Count: segfault, memory has already been freed - destructor (deallocate memory) Something is still wrong in the given example. --