On Thursday, 9 April 2015 at 18:44:10 UTC, Walter Bright wrote:
The only real purpose to a postblit is to support ref counting. Why would a by-value container use a postblit and not ref count?

A struct could have a postblit defined if you are implementing something like std::vector, where you you copy the memory when the struct is copied. I'm not sure why you would want to do such a thing in D, though. If allocating memory is your concern, you probably don't want any allocation, including malloc.

Reply via email to