From: jsancho Date: Mon, 12 Oct 2009 11:00:06 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=d672794dd75f5607aa8b60d5b67474887cd6ae73;p=gacela.git --- diff --git a/gacela.lisp b/gacela.lisp index 3f75376..6ad199f 100644 --- a/gacela.lisp +++ b/gacela.lisp @@ -182,10 +182,12 @@ (setf (gethash key resources-table) resource))) (resource-plist resource))))) + (defun free-resource (key) + (funcall (resource-destructor (gethash key resources-table))) + (setf (resource-time (gethash key resources-table)) nil)) + (defun free-all-resources () - (maphash (lambda (key res) (funcall (resource-free-function res) (resource-address res))) - resources-table) - (clrhash resources-table))) + (maphash (lambda (key res) (free-resource key)) resources-table))) ;;; Connection with the GUI