> Hello,
> 
> I am writing a book on PHP with Andrei Zmievski and I asked him a
> question on how resources are handled and he suggested posting the
> question here.
> 
>> >Hi Andrei,
>> >
>> >I am doing the 2nd database chapter and had some problems that I hope
>> >you can clarify:
>> >
>> >1. Are open resources (eg. database link_identifiers) automatically
> cleaned up
>> >when the page completes,
>> >or only when the apache child process dies?
>>
>> I *think* they hang around for as along as apache child lives, but you
>> may be better off asking Zeev or Andi about it.
> 
> My suspicion is that persistent resources are only cleaned up when the
> child process dies, while non-persistent resources are closed
> immediately at the end of the page/script. Does anyone know the correct
> answer?

Oddly enough there is no such easy answer. In short it is up to the way the
extension is encoded. 

To the point that I know, there is no periodic "clean-up" call that goes
out.


> 
> If you can spare the time, I would be grateful for an answer to the
> following questions too:
> 
> 2. If resources are not cleaned up until the apache child process dies,
> what will happen in multi-threaded servers like Apache 2 and IIS?

Good question.




-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to