[TYPO3-mvc] ObjectStorage with large quantities of DB-Objects

Nils Blattner nb at cabag.ch
Wed May 26 08:34:29 CEST 2010


Am 25.05.10 08:46, schrieb Martin Kutschker:
> Nils Blattner schrieb:
>>
>> I tried to remove the extbase references with
>> $session->unregisterReconstitutedObject($user);
>> where $session is the session of the persistence manager.
>
> Why didn't it work?
>
> Did you use PHP 5.3 with the garbage collection turned on or an ealier version? Note that any
> objects with cyclic references * will never be released fro memory by PHP 5.2 and earlier.
>
> Masi
>
> *
>
> // case 1
> parent->child = new Child()
> child->parent = parent
> unset(parent)
> // memory for parent and child is still allocated!!!
>
> // case 2
> parent->child = new Child()
> child->parent = parent
> unset(child->parent)
> unset(parent)
> // memory for parent and child is freed
>

PHP Version is 5.2.12 or something like that.

However I was very thorough with removing my own references to the 
objects and can only assume they are still kept inside extbase in some form.

I take it you refer to chunks of memory referencing between each other, 
but not connected to the root in any way when you say cyclic references.
That might be the case, but I'd have to look further into it.

So they changed from reference counting to mark 'n sweep in 5.3?

Greets
Nils


More information about the TYPO3-project-typo3v4mvc mailing list