[erlang-questions] OTP-9649 and further changes

Björn Gustavsson <>
Mon Jan 23 11:10:00 CET 2012


On 1/18/12, Jon Watte <> wrote:
> I have a separate question about this.
>
> {M, F} references survive code reload and old code purge. That is, you can
> hold on to these references "forever."
> fun() -> M:F() end does not -- once the code that defined the fun is
> purged, any reference will now generate an exception when called.
>
> Will "fun M:F/A" survive reloads and old code purge, and behave like the
> tuple function?
>

Yes. This behavior is documented at the end of section 7.17 in
the reference manual:

http://www.erlang.org/doc/reference_manual/expressions.html#id77989

/Björn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list