垃圾回收机制

Table of Contents

这部分将说明PHP 5.3的新的垃圾回收机制(也就是GC)的特点。

add a note add a note

User Contributed Notes 1 note

up
-52
neo22s at gmail dot com
2 years ago
Memory cleanup for long-running scripts.

<?php
gc_enable
(); // Enable Garbage Collector
var_dump(gc_enabled()); // true
var_dump(gc_collect_cycles()); // # of elements cleaned up
gc_disable(); // Disable Garbage Collector
?>
To Top