Hannes Landeholm wrote:
- Weak references solves the loose coupled object indexing problem. "I need
this reference as long as it's referenced somewhere else."
- Soft references solves the caching problem. "I need this reference as long
as we have plenty of memory available."
- The GC solves the cyclic reference problem (since 5.3).

Personally I think I need to get my head around just how these cyclic references come about? I've always viewed my own data structure as 'linear', and while I monitor for memory leaks, it's not something I have seen for many years. I tend to create just the objects I need, or reuse a single object several times reloading the latest data, so nievely assume that when I unset them the space is freed.

So I'm more interested in hitting the memory limit because I've got too much open rather than trying to work out if there is something I can throw away short term. I'll pull a list from the database with the key data, and only access the full object IF I need some fine detail. Anything that becomes more 'interesting' gets added to the list. This probably comes about from my time designing code sing chip micro's ... the whole application fits in 1024 works of memory so one gets creative :)

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to