开发者

PHP: How good is garbage collector?

开发者 https://www.devze.com 2023-03-01 14:27 出处:网络
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 importa

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

精彩评论

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