Memory Management in Pulp

I have been working on a Pulp game for some time, and I am now seeing random crashes complaining about running out of memory.

I really have no idea how things are kept in memory for Pulp so any information you have would be great. It seems like Pulp was built so that it would be hard to run out of memory (no arrays/lists, no classes, no dictionaries, nothing that can grow to arbitrary size except strings) so I assume most memory issues are caused by too many rooms or tiles? or I guess large strings?

The crashes are not right away. It takes some playing for it to happen so it makes me think that a leak is happening somewhere, but I'm not sure what could even leak. Do rooms keep a change log or something and changing the tiles on the same room often will overflow that log? I don't know, I'm just coming up with random ideas because I'm at a loss.

It's not something I've seen yet, so unless you're doing something ridiculous with huge tile sets or infinite lines of code, I wonder if there's something recursing that triggers it, perhaps.

Do you see it happening in the browser, on device, or both?

Is there any pattern to it, like users doing a particular thing, or it happening in a particular room? Or after a certain amount of time?

It's only happening on the device. It's probably not recursion, I do run a lot of loops and if I mess one up, it does crash, but it has a special recursion error. Despite my best efforts, there seems to be nothing like dynamic arrays so I can't make loops that do something like

while i<100 do
  a[i] = "something"
end

so I can't see how it'd be increasing in memory across loops, dynanically sized variables just aren't an option in pulp

as for if it happens in a certain room or after a certain time, that's hard to say: much of the game happens in one room. this room will often go through a lot of tile swaps (maybe 80% of the room's tiles) every couple minutes.

it's also something I'm only seeing with the more serious game testers who play a lot and let me know about the error: I'm actually not good enough at the game to keep it going that much

if you'd like to see an export of the game or a pdx of it, I don't mind sharing, but be warned, it is A LOT

frankly, I think I am doing something ridiculous, but it's been going so well until this