Re[2]: [PHP-DEV] Weak references in PHP

2003-02-28 Thread Andi Gutmans
At 08:00 PM 2/28/2003 +0300, Konstantin Knizhnik wrote: Hello Andi, The problem is that script can fetch very large number of objects and all of them doesn't fit in the memory. Lets say we have very large list of objects (several millions objects or more). And our script traverse the list and fetc

Re: Re[2]: [PHP-DEV] Weak references in PHP

2003-02-28 Thread J Smith
ZE2 == Zend Engine 2, which will be replacing the current Zend Engine in PHP 5. Amoung other things, one of it's main features is a more roboust OOP framework, which includes class destructors. J Konstantin Knizhnik wrote: > Hello George, > > Friday, February 28, 2003, 5:46:18 PM, you wrote:

Re: Re[2]: [PHP-DEV] Weak references in PHP

2003-02-28 Thread George Schlossnagle
Using __destruct method (thanks to George) it may be possible to implement what I need, but only if object cache is implemented in C (and so is not visible for PHP garbage collector). So no pure PHP solution exits. Unfortunately I didn't fins any reference to __destruct method in PHP manual and do

Re[2]: [PHP-DEV] Weak references in PHP

2003-02-28 Thread Konstantin Knizhnik
Hello George, Friday, February 28, 2003, 5:46:18 PM, you wrote: >> Can anybody tell me if such features are available in PHP (I failed to >> find >> them myself). GS> Look at __destruct method for classes in ZE2. They wopn't tell you the GS> reference count, but the do get called when the ref

Re[2]: [PHP-DEV] Weak references in PHP

2003-02-28 Thread Konstantin Knizhnik
Hello Andi, The problem is that script can fetch very large number of objects and all of them doesn't fit in the memory. Lets say we have very large list of objects (several millions objects or more). And our script traverse the list and fetch objects one by one and do some calculations (for examp

Re: [PHP-DEV] Weak references in PHP

2003-02-28 Thread Andi Gutmans
Hi, I don't quite understand. If you are thinking of implementing something similar to JDO then your persistent object manager will only hold the objects which are retrieve by the script. At the end of the request it'll persist the changes and will free the objects. Why would you want them to

Re: [PHP-DEV] Weak references in PHP

2003-02-28 Thread George Schlossnagle
Can anybody tell me if such features are available in PHP (I failed to find them myself). Look at __destruct method for classes in ZE2. They wopn't tell you the reference count, but the do get called when the ref count goes to 0. -- PHP Development Mailing List To unsubscr

[PHP-DEV] Weak references in PHP

2003-02-28 Thread Konstantin Knizhnik
To be able to implmenet interface of object-oriented database to PHP I need to have object cache which will map persistent object identifier (OPID) to loaded instance of the object. This cache should be "weak", i.e. it should not prevent garbage collection from deallocating unused instances of peri