Sending an immutable object to a thread

rsw0x via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 22 07:35:56 PDT 2015


On Wednesday, 22 July 2015 at 09:04:49 UTC, Marc Sch├╝tz wrote:
> On Tuesday, 21 July 2015 at 21:50:35 UTC, rsw0x wrote:
>> On Tuesday, 21 July 2015 at 21:44:07 UTC, rsw0x wrote:
>>> [...]
>>
>> addendum:
>> http://dlang.org/garbage.html
>>
>>>[...]
>>
>>>[...]
>>
>> I believe this implies that it would *not* keep the object 
>> alive.
>>
>> Sorry for the confusion/noise.
>
> But as long as the original pointer is still on the stack, that 
> one _will_ keep the object alive. It is only a problem if all 
> pointers to a GC managed object are stored in places the GC 
> isn't informed about.

correct, I managed to confuse myself :o)


More information about the Digitalmars-d-learn mailing list