Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
pjmlp
11y ago
0 comments
Save
Share
This does not work if the GC updates the pointer concurrently.
0 comments
3 comments · 1 top-level
top
newest
oldest
crawshaw
11y ago
· 2 in thread
The GC will not update a pointer once it is converted to the type uintptr. It becomes invisible to the precise collector, so the uintptr acts as an id value.
pjmlp
OP
11y ago
Worse, it might be collected then as the collector might think it is no longer in use.
ianlancetaylor
11y ago
But it's in the map, so it's in use.
1 more reply
j
/
k
navigate · click thread line to collapse