3 ms·
You can have aliasing pointers in go; see https://gobyexample.com/mutexes https://gobyexample.com/mutexes for how you have to explicitly lock to update the targ
by shadowmint 12y ago
You can have aliasing pointers in go; see https://gobyexample.com/mutexes https://gobyexample.com/mutexes for how you have to explicitly lock to update the target without undefined behaviour.
However, since it's a GC, it's probably not possible to have a pointer that refers to a memory location that doesn't exist, because having a pointer to a memory location is by definition what keeps it from being free'd by the GC.
- EugeneOZ 12y agothanks. but time between 2 lines of code can be not enough for GC to be called to free first address. Maybe they just control it on language level.