On 09/27/2018 07:19 PM, Francis wrote:
> It is true that uintptr is not looked at by the garbage collector. This
> will definitely reduce your GC costs. But there is no way (that I know
> of) to convert your uintptr back into a *Object that is safe.

I assume of course that we know that all uintptr in the map is actuall
*Object

> Because uintptr is ignored by the GC it won't keep the memory it points
> to alive. So the *Object could, and very likely will, be collected as
> garbage. As noted above the sync.Pool is allowed to discard things that
> it is pooling. The last time I read the details the strategy was to
> clear _everything_ in the pool during a GC run.

But not objects returned by Get() for which Put() has not yet been
called, I assume. ?

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

Reply via email to