Some code to trigger garbage collection in Erlang and Elixir.
The package is published in hex.pm can be installed with:
- Add
garbage_man
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:garbage_man, "~> 0.1.0"}]
end
```
- Ensure
garbage_man
is started before your application:
```elixir
def application do
[applications: [:garbage_man]]
end
```
According to this resource, some long running processes can occupy a large amount of binary memory.
This module contains some Macros that try to handle that scenario.
See example/my_long_running_process.exs
for demonstration code.