Eldar Insafutdinov wrote:
Walter Bright Wrote:
Max Samukha wrote:
Here is a non-template implementation that should fix the problems (it is
a template but only formally):
Thanks, I've incorporated it.
Thanks for that, but what about the other issues, why does this function have
to be a template?
So it works with other types, though that isn't implemented.
Why does calling __dtor doesn't call base class destructors(as it is done in
C++)?
Doing it that way is non-trivial, and I was in a hurry to get the system
working. Class destructors are rarely used in D, so doing it the simple way is
not a performance issue.
Destructors for structs, however, are done the more complicated (and more
performant) way because they need to be more efficient.