You are here: Re: Memory leak in PHP « PHP Programming Language « IT news, forums, messages
Re: Memory leak in PHP

Posted by gosha bine on 06/18/07 22:59

Jerry Stuckle wrote:
> gosha bine wrote:
>> On 18.06.2007 16:15 Jerry Stuckle wrote:
>>> gosha bine wrote:
>>>> On 18.06.2007 14:11 Jerry Stuckle wrote:
>>>>> gosha bine wrote:
>>>>>> On 18.06.2007 04:30 Benjamin wrote:
>>>>>>> On Jun 16, 3:35 am, gosha bine <stereof...@gmail.com> wrote:
>>>>>>>> Benjamin wrote:
>>>>>>>>> I've heard that the Zend Engine's garage collector is not
>>>>>>>>> perfect, so
>>>>>>>>> can someone demonstrate how to create a memory leak in PHP?
>>>>>>>> ZE doesn't use garbage collector, it implements reference counting
>>>>>>>> algorithm that is notorious for its inability to handle circular
>>>>>>>> references. If you have an object A that holds a reference to B,
>>>>>>>> and B
>>>>>>>> directly or indirectly refers back to A, neither A nor B will be
>>>>>>>> freed
>>>>>>>> until the script ends.
>>>>>>> According to Wikipedia (http://en.wikipedia.org/wiki/
>>>>>>> Reference_counting), reference counting is a form of garbage
>>>>>>> collecting.
>>>>>>
>>>>>> The nice thing about Wikipedia is that if you find wrong or
>>>>>> confusing information there, you can correct it immediately. ;)
>>>>>>
>>>>>>
>>>>>
>>>>> Except in this case it is not wrong or confusing. It is a method
>>>>> of garbage collection.
>>>>>
>>>>
>>>> Well, I know at least two people who are already confused. ;)
>>>>
>>>> Before starting the next meaningless scholastic discussion about
>>>> terms, make sure you do understand how GCs work and what is the
>>>> difference between "tracing"/"full-automatic" GCs and reference
>>>> counting.
>>>>
>>>
>>> Believe me - I know how garbage collection works. I haven't been
>>> programming longer than you've been alive without finding out.
>>>
>>> You really need to understand the terminology before you start
>>> telling people they're wrong.
>>>
>>
>>
>> Of course, I believe you, Jerry. Everyone knows you are an experienced
>> programmer and smart polemicist.
>>
>>
>
> And everyone knows you're full of horse hockey.

Did I say "smart polemicist"? Yes indeed, very smart polemicist, strong
but always correct.

>
> Learn what garbage collection is - then figure it out for yourself. You
> seem to think the way Java does it is the only way. It's not.

Yeah, keep looking down on me. I'm glad I was helpful in raising your
self-esteem. Hope you're satisfied with yourself now.


--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация