Now if you narrow it to a module scope function and a module scope decoder or generator, then no they won't get collected anymore than anything else at module scope and hence the reference cycle is immaterial to the GC. But that argument would apply just as well to a cyclic list at module scope.
Mark > On Dec 8, 2017, at 6:13 PM, Mark Hamburg <[email protected]> wrote: > > Functions get garbage collected. Otherwise think what would happen every time > you use partial function application or define a function within a let or > other nested context. Because those functions (can) capture values, they are > new values just as much as a list or record or other data value would be. > > Mark > >> On Dec 8, 2017, at 1:55 AM, 'Rupert Smith' via Elm Discuss >> <[email protected]> wrote: >> >>> On Friday, December 8, 2017 at 5:55:36 AM UTC, Mark Hamburg wrote: >>> Functions are also heap allocated objects and reference other objects — >>> e.g., decoders — just like other objects do. >> >> But presumably functions do not get garbage collected? >> -- >> You received this message because you are subscribed to the Google Groups >> "Elm Discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
