From eb2e765e782e2e90eed016084434eb1440944d8f Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Thu, 2 Feb 2012 17:56:18 +0000 Subject: [PATCH] Added a function for forgetting a object when memory constraints apply. --- api/fedora_item.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/fedora_item.inc b/api/fedora_item.inc index a79749a7..4d309ba8 100644 --- a/api/fedora_item.inc +++ b/api/fedora_item.inc @@ -55,6 +55,15 @@ class Fedora_Item { Fedora_Item::$instantiated_pids[$pid] = &$this; } } + + /** + * Forget this Object, do manually when memory constraints apply. + * + * Removes this object from the static list of $instantiated_pids + */ + function forget() { + unset(Fedora_Item::$instantiated_pids[$pid]); + } /** * Exists