[erlang-questions] Actor garbage collection
Thu Nov 4 15:13:15 CET 2010
This process will be waiting forever, until it gets a message (or get an
exit signal). It doesn't matter if "we" have the pid or not. It's still a
living process. (btw, all living pids still can be listed using
A process will terminate when it has no more code to execute or when a
run-time error occurs.
Garbage collection has to do with the memory used by the process, not with
the process life.
On Thu, Nov 4, 2010 at 2:52 PM, Gleb Peregud <> wrote:
> No, AFAIK
> On Thu, Nov 4, 2010 at 14:32, Tony Hannan <> wrote:
> > Hello,
> > Does an orphaned waiting process get garbage collected? By orphaned I
> > no one references it (no one has its pid) so it will never receive
> > messages. By waiting I mean it is waiting for a message inside a receive.
> > For example,
> > Wait = fun() -> receive _ -> 0 end end.
> > spawn(Wait).
> > Will that spawned process live and wait forever even though we did not
> > capture its pid and thus can't send messages to it, or will it be garbage
> > collected eventually?
> > Thanks,
> > Tony
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
- Ahmed Omar
Follow me on twitter
More information about the erlang-questions