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.

fre 28 sep. 2018 kl 15:12 skrev Robert Engels <reng...@ix.netcom.com>:

> His statement is correct. First of all, a weak reference in java is not
> like a weak pointer in C++, at least they are not needed to break cycles,
> as the GC is immune to that issue. The difference is that a weak hashmap
> uses weak references to refer to the contained objects so that they will be
> collected if nothing else refers to them, similar to a Lru cache. In this
> case it is a uintptr which is not a reference to anything, it is just an
> integer.
>
> On Sep 28, 2018, at 8:00 AM, Henrik Johansson <dahankz...@gmail.com>
> wrote:
>
> That's clever but irrelevant for this discussion.
>
> fre 28 sep. 2018 kl 14:57 skrev Jan Mercl <0xj...@gmail.com>:
>
>> On Fri, Sep 28, 2018 at 2:53 PM Henrik Johansson <dahankz...@gmail.com>
>> wrote:
>>
>> > The data pointed to by the uintptrs ...
>>
>> Uintptrs are integers. They do not point to anything.
>> --
>>
>> -j
>>
>

-- 
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.

Reply via email to