On Tue, May 2, 2017 at 8:35 PM Piotr Narewski <piotr...@gmail.com> wrote:

> Does anyone know a way to do something like this (freeing memory on
demand), but using pure Go?
> Something that will compile (and work) on any platform, without any extra
dependencies..

sync.Pool could be probably a good fit. Usage example:
https://github.com/cznic/internal/blob/e5e1c3e9165d0a72507c2bbb0ffac1c02b8d3f7c/slice/pool.go
-- 

-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