Garbage collection of binaries

Joachim Durchholz joachim.durchholz@REDACTED
Fri Oct 17 11:07:50 CEST 2003

James Hague wrote:
> One hacky solution is to call erlang:garbage_collect all over the place,
> but...yuck.

Destruct the last known reference to the binary, then call garbage_collect.
That's not too yucky: the code that's responsible for the binary is also 
responsible for the clean-up.

I'm somewhat surprised that GC doesn't kick in. It should. The binary is 
taking up lots of memory.

> Any other workarounds?

I'd recommend Sean's solution. Processes are cheap after all.


More information about the erlang-questions mailing list