On Saturday, 29 August 2015 at 14:00:59 UTC, ponce wrote:
On Saturday, 29 August 2015 at 13:43:33 UTC, cym13 wrote:
But nobody's linking the destructor to it because of the
separation of concerns principle: we release what has to be
released and only that: freeing the object is the realm of the
GC.
I see what you mean, but Unique!T, RefCounted!T and scoped!T
call the destructor, not the release() function you just
defined. So separating concerns break those.
Yes, and I think it is kind of cumbersome actually. Being able to
pass a method to scoped!T for example would be really great (with
the destructor as default of course).