On 09/28/2018 03:11 PM, Robert Engels wrote: > 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. Sure... Ok... it sounds like it might be the same thing I was considering whether could be done. In other words.. using a map as index into another datastructure without the map values being considered by the garbage collector as references. /Peter -- 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.
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Henrik Johansson
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Peter Mogensen
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Peter Mogensen
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Henrik Johansson
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Peter Mogensen
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Jan Mercl
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Henrik Johansson
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Henrik Johansson
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Dan Kortschak
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Dan Kortschak
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Peter Mogensen
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Peter Mogensen
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Peter Mogensen
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Peter Mogensen
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Tamás Gulácsi
- Re: [go-nuts] Huge map[string]*Object and GC where *Objec... Peter Mogensen