Sending an immutable object to a thread
rsw0x via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jul 19 10:12:05 PDT 2015
On Sunday, 19 July 2015 at 17:04:07 UTC, Frank Pagliughi wrote:
>> [...]
>
> Oh, yes, pointer. Ha! I didn't even think of that. Thanks.
>
> I'm not familiar with how garbage collection works in D. If the
> initial reference goes out of scope, and you just have a
> pointer - in another thread, no less - then are you still
> guaranteed that the object will not disappear while the pointer
> exists?
>
> [...]
a pointer to a pointer(or in this case, a reference) does not
keep it alive.
More information about the Digitalmars-d-learn
mailing list