I think that the engine reuses the IDs of the game objects due to the “object pooling” that happens behind the scenes( How to use object pooling? ) so the bullets table shouldn’t grow forever.
I don’t know if it’s a certain thing but In my case, the bullets table size is constant(around 20) after firing 1000s of bullets. The only thing to handle is setting bullets[id]=false after the collision is done.