On Monday, 31 March 2014 at 01:03:22 UTC, Carl Sturtivant wrote:
What about destructors, are they always called, or is this another optimization if the struct is in it's default .init state?

AFAIK, a destructor is always called when an object goes out of scope... unless, it's being moved out of scope. As a matter of fact, spec RVO *will* get triggered. This is what allows witting factory functions for types without postblit.

In any case, there should be 1 destructor call for every object you declared.

Except for thing on the heap. Those are just collected, not destroyed :/

Reply via email to