On 2/26/15 5:28 PM, Rikki Cattermole wrote:
On 27/02/2015 10:50 a.m., Andrei Alexandrescu wrote:
http://wiki.dlang.org/DIP74 got to reviewable form. Please destroy and
discuss.

Thanks,

Andrei

Either I missed something or:

If I go new a type like:
Widget widget = new Widget();

This would still use the GC to allocate the memory + emplace it. Even if
it contains the two special RC functions.

Yah, DIP74 is intentionally very "policy up, implementation down". It completely leaves the allocation mechanism to user code. See e.g. this excerpt: "Usually such approaches also use private constructors and object factories to ensure the same allocation method is used during creation and destruction of the object."

Also what about properties?
What if one of them may or may not be RC'd. Should there be a
conditional call to the GC to add it to be scanned on assignment?

I don't understand this. Members compose naturally.


Andrei

Reply via email to