3 ms·
> Guaranteed memory safety: Yes! (in code marked with the appropriate annotations) Really? So if a thread passes a pointer to an object to another thread which
by tus88 7y ago
> Guaranteed memory safety: Yes! (in code marked with the appropriate annotations)
Really? So if a thread passes a pointer to an object to another thread which frees it, the sending thread can no longer reference it? Genuine qn.
- Crinus 7y agoAccording to the linked article, by "passing a pointer" the sending thread relinquishes ownership of the object and, yes, cannot access it anymore after the point where it was sent. Of course this assumes all code in these threads use the ownership+borrowing mode.