My wife hardly ever closes a tab in Firefox, hogging the poor virtual memory of the computer. I tried to educate her, alas in vain. I tried different add-ons, but they didn't work for her. So I whipped up this add-on that closes tabs that weren't active for a configurable time. This idle time of the tabs is measured while Firefox states it's active, so it's a relative idle time. Of course, this idle time is maintained across Firefox sessions. When this add-on closes a tab, it will look up the tab's URIs in the bookmarks and if found, it will tag them with "Swept Tab", if not found, it will also bookmark them in the "Swept Tabs" folder.
Pinned tabs are left alone.
The remaining issue for me is that every open window has one active tab. I don't know how to deal with them properly. I may add a function that periodically merges single-tabbed windows.