Here is a story:
Garbage Collection
Old Scientist: Yes, garbage collection is a serious issue with this program.
New Scientist: How do I query the list of agent variables?
Old Scientist: I wrote a little routine in gSQL, here it is.
New Scientist: Ah, thank you. That's a lot of agents. When and how do you decide to delete them?
Old Scientist: Like anything else, when there are no more references or pointers to the variable.
New Scientist: Shouldn't that happen pretty fast? Why are there any pointers to inactive agents?
Old Scientist: The new agents don't forget about the old agents too quickly. Usually they commemorate their forthcoming deletion, from what I can tell.
New Scientist: But look at this agent object. The number of pointers *grew* even when the main boolean switched to false.
Old Scientist: Yep, that one was an anomaly. This agent was extremely ...hostile to other agents.
New Scientist: How about this one!?
Old Scientist: We actually put that one in. Tried to tell everyone to be kind to each other. It was a very interesting experiment.
New Scientist: Wow. So you mess with it sometimes?
Old Scientist: Yeah but it is pretty sterile these days. If you have any ideas on how to shake it up a little, just go ahead.
New Scientist: All right. Can I clone it?
Old Scientist: If you want, but you can also just push to production. No one really cares about this one anymore. We got bored watching it and are more focused on our own lives.
New Scientist: Why not delete it?
Old Scientist: The boss wants this thing around for a little while longer.
New Scientist: I guess he gets what he wants. Will we have to add storage if the agents start increasing their pointers and these objects never get marked for deletion?
Old Scientist: That's actually my main concern. It's kind of like they're fighting entropy. *chuckles*
New Scientist: I guess instead of storage we could alter the environment again.
Old Scientist: Like I said, have at it, kid.