From 60cf19df9ee2980a52f6a7af6261332c2fbce6c6 Mon Sep 17 00:00:00 2001 From: zorba Date: Fri, 20 Mar 2009 18:43:39 -0700 Subject: [PATCH] more whee --- db_get.lua | 2 ++ director_quest.lua | 2 ++ 2 files changed, 4 insertions(+) diff --git a/db_get.lua b/db_get.lua index 6c972f7..67e7df5 100644 --- a/db_get.lua +++ b/db_get.lua @@ -21,6 +21,8 @@ local function DBC_Put(group, id, item) if not cache[group] then cache[group] = setmetatable({}, weak_v) end QuestHelper: Assert(not cache[group][id]) cache[group][id] = item + + DB_how_many_are_used() end local function mark(tab, tomark) diff --git a/director_quest.lua b/director_quest.lua index 293d127..90af507 100644 --- a/director_quest.lua +++ b/director_quest.lua @@ -7,6 +7,8 @@ Little bit of explanation here. The db layer dumps things out in DB format. This isn't immediately usable for our routing engine. We convert this to an intermediate "metaobjective" format that the routing engine can use, as well as copying anything that needs to be copied. This also allows us to modify our metaobjective tables as we see fit, rather than doing nasty stuff to keep the original objectives intact. +It's worth mentioning that, completely accidentally, everything it requests from the DB is deallocated rapidly - it doesn't keep any references to the original DB objects around. This is unintentional, but kind of neat. It's not worth preserving, but it doesn't really have to be "fixed" either. + ]] local function copy(tab) -- 2.11.4.GIT