[erlang-questions] demonitor

Claes Wikstrom klacke@REDACTED
Fri Aug 22 13:56:55 CEST 2008

I just recently discovered some bugs in the ssh application.
basically it's a code like in gen.erl

                 {'DOWN', Mref, _, _, _} ->
                     {ok, Reply}
             after 0 ->
                     {ok, Reply}

The flushing wasn't there in the ssh app, and thus the DOWN messages
got accumulated and there was a memory leak. (I posted to erlang-patches)

Anyway, here is my question.

Don't you _always_ want to do that flushing after demonitor. And if
so, shouldn't the BIF do that. I bet there is whole lot of code
out there which doesn't properly do the flush.


More information about the erlang-questions mailing list