I am looking to implement a system that has as facts “events” that happen randomly.

 

How is the best way to implement a “garbage collection” mechanism that if the number of “events” in the working memory reaches a limit value will retract the oldest event/s…

 

Thanks

 

--zoly