Monday, November 08, 2010 at 12:05 AM.


on collectTempTables () {
		<<9/25/10; 12:31:21 PM by DW
			<<Also delete longpoll tables that have their enabled booleans set false.
		<<8/15/10; 9:40:15 PM by DW
	local (adrlongpolls = @system.temp.realtime.server.longpolls);
	if defined (adrlongpolls^) {
		local (i, adrtable, fldelete);
		for i = sizeof (adrlongpolls^) downto 1 {
			fldelete = false;
			adrtable = @adrlongpolls^ [i];
			if not adrtable^.enabled {
				fldelete = true}
			else {
				if not thread.exists (adrtable^.idthread) {
					fldelete = true}};
			if fldelete {
				delete (adrtable)}}}};
bundle { //test code
	collectTempTables ()}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.