API CHANGE: Remove dodgy DataObject::destroy() behaviour, opting instead for using PHP5.3's garbage collector.

This commit is contained in:
Sam Minnee 2012-06-11 22:38:59 +12:00
parent e96ca5fb9a
commit f65a7c6b21
2 changed files with 7 additions and 6 deletions

View File

@ -207,6 +207,11 @@ mb_http_output('UTF-8');
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
/**
* Enable better garbage collection
*/
gc_enable();
///////////////////////////////////////////////////////////////////////////////
// INCLUDES

View File

@ -408,12 +408,8 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* You'll need to call this to get the memory of an object that has components or extensions freed.
*/
function destroy() {
$this->extension_instances = null;
$this->components = null;
$this->destroyed = true;
$this->record = null;
$this->original = null;
$this->changed = null;
//$this->destroyed = true;
gc_collect_cycles();
$this->flushCache(false);
}