On 13-10-2012 22:00, David Nadlinger wrote:
On Saturday, 13 October 2012 at 19:34:29 UTC, Alex Rønne Petersen wrote:
There is a difference: Adding the object itself as a root does not
actually guarantee that the object *itself* might not be collected. At
least, this is how I have to assume things work given that this is not
guaranteed here: http://dlang.org/phobos/core_memory.html#addRoot

Actually, it does: the internal array of added roots is simply
considered an additional range to be scanned by the GC implementation.
The docs should probably be clarified in this regard.

David

That's good to know.

I'm not convinced that this should be defined behavior though. It encourages semantically incorrect use of the API (see my other reply).

--
Alex Rønne Petersen
a...@lycus.org
http://lycus.org

Reply via email to