On Monday, 23 February 2015 at 18:16:38 UTC, Andrei Alexandrescu wrote:
The typechecker must WHILE COMPILING WIDGET, NOT ITS CLIENT know whether getName() is okay or not.

Aye, I haven't been following this thread closely, but I thought of this case a while ago myself and it actually led me to the belief that the this pointer needs to be scope unless the class itself is designed solely for GC use; escaping anything through it must not be allowed for guaranteed memory safety if it is manually freed in any form, whether refcounting, RAII, or free.

If this is scope, then the usage site has freedom of deallocation method. If not, it must be known at design time of the class itself.

Reply via email to