srenatus has quit [Quit: Connection closed for inactivity]
profetes has joined #ponylang
<profetes>
Hi, I'm abusing Pony a bit and I have a question regarding GCing actors. In my program (AoC2018.5) I created double-linked list, where each node is an actor, each node has references to _prev and _next. I keep a reference for a first actor in the list. I check the status by sending Result(~Promise) iso object into the list. Additionally each Actor reports its state changes to Watcher. Each list belongs to an actor that
<profetes>
created it and holds a reference to the first item in the list.
<profetes>
Question: My list consists of ~50k actors. Pony does not seem to try to GC my list, even after I lost references to them.
<profetes>
GC works correctly when program ends. Program ends normally for 1 such list.
<profetes>
Problem happens when I create a few of such lists. I run out of RAM. I instanciate one such list at a time and I expected that previous(solved) ones would be GCed, since I hold no explicit references to them. But they are not. Only some minor objects get GCed. And OOM kills the program.
<profetes>
What may be stopping GC from freeing the memory of those agents? Their inboxes are empty. In their "outbox" there might be a message to some Promises. Is that the reason? Where to start looking? Can I manually finalize those lists? I'd much appreciate any hints to debug this further.