You put in it a number that has the same bit pattern as a pointer to a value. There is nothing more to it than that. It does not refer to anything. They exist so you can do uncomfortable pointer arithmetic.
On Fri, 2018-09-28 at 15:14 +0200, Henrik Johansson wrote: > I know what a uintptr is but what would you put in it if not a > pointer to > another object? > Isn't this very analogous to what you said: "a weak hashmap uses weak > references to refer to the contained objects so that they will be > collected > if nothing else refers to them". > > Maybe I am missing something. I never meant to imply that they worked > the > same way _internally_ but at a conceptual level. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.