开发者

PHP: How good is garbage collector?

Do you do something manually in your projec开发者_如何学运维ts after PHP 5.3?


Generally, I implement __destruct() everywhere to clean up object trees and close connections, etc.. This is pretty important for long running PHP code.

I recently found gc_collect_cycles. It's pretty helpful as well. It's as good as cleaning up your variables yourself, but from what I read it also has a small performance penalty.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜