Home  >  Article  >  Backend Development  >  Recommended 3 articles about recycling cycle

Recommended 3 articles about recycling cycle

黄舟
黄舟Original
2017-06-15 13:57:381093browse

Traditionally, the reference counting memory mechanism used in PHP cannot handle circular reference memory leaks. However, 5.3.0 PHP uses the synchronization algorithm in the article » Concurrent Cycle Collection in Reference Counted Systems to deal with this memory leak problem. A full description of the algorithm is somewhat beyond the scope of this section, and only the basics will be covered. First, we need to establish some basic rules. If a reference count is increased, it will continue to be used and of course no longer in the garbage. If the reference count is reduced to zero, the variable container will be cleared (free). That is, a garbage cycle occurs only when the reference count decreases to a non-zero value. Secondly, during a garbage cycle, find out which parts are garbage by checking whether the reference count is reduced by 1 and checking which variable containers have zero references. The above is the content of PHP Features Garbage Collection Mechanism 2 - Recycling Cycle. For more related content, please pay attention to PHP

1. PHP Features Garbage Collection Mechanism 2 - Recycling Cycle

Recommended 3 articles about recycling cycle

#Introduction: Traditionally, the reference counting memory mechanism used in PHP cannot handle cycles. Reference memory leak. However, PHP 5.3.0 uses the synchronization algorithm in the article » Concurrent Cycle Collection in Reference Counted Systems to deal with this memory leak problem.

2. php garbage collection mechanism - recycling cycle

Recommended 3 articles about recycling cycle

Introduction: The garbage collection mechanism of PHP characteristics - recycling cycle

3. The recycling cycle of PHP garbage collection mechanism

Introduction:: This article mainly introduces the recycling cycle of PHP garbage collection mechanism. Students who are interested in PHP tutorials can refer to it.


The above is the detailed content of Recommended 3 articles about recycling cycle. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn