<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_19315"> 消耗服务器内存用的代码片。 <div class="blockcode"> <div id="code_CPW"><ol> <li><?php<li>class Foo {<li>function __construct()<li>{<li>$this->bar = new Bar($this);</li> <li>}</li> <li>}</li> <li> <li>class Bar {</li> <li>function __construct($foo = null)</li> <li>{</li> <li>$this->foo = $foo;</li> <li>}</li> <li>}</li> <li> <li>while (true) {</li> <li>$foo = new Foo();</li> <li>unset($foo);</li> <li>echo number_format(memory_get_usage()) . "/n";</li> <li>}</li> <li>?></li> </ol></div> <em onclick="copycode($('code_CPW'));">复制代码</em> </div> </td></tr></table> <div id="comment_19315" class="cm"> </div> <div id="post_rate_div_19315"></div> <br><br>