On Thursday, 6 February 2014 at 08:28:34 UTC, luka8088 wrote:
is manual or automatic. And it seems to me that a new type
qualifier is
a way to go:
class A {
garbageCollected(B) child1;
referenceCounted(B) child2;
manualMemory(B) child3;
}
class A {
@shared @delayedrelease @nodestructor @cycles B child1;
@shared @immediaterelease @nocycles B child2;
@owned @nocycles B child3;
}
Based on the required qualities, static analysis and profiling
the compiler choose the most efficient storage that meet the
constraints and match it up to the available runtime.