segmentio / fasthash

Go package porting the standard hashing algorithms to a more efficient implementation.
MIT License
283 stars 21 forks source link

respect unsafe rules #3

Closed achille-roussel closed 7 years ago

achille-roussel commented 7 years ago

I read more carefully the unsafe.Pointer rules and noticed that I had made a mistake here, converting a uintptr to a unsafe.Pointer has to be done within a single expression, otherwise the GC may not know that the pointer is referenced and may mistakenly reclaim the memory.

Nothing much to review here, I just wanted to share the knowledge.