4 ms·
PHP has no destructors?
by ExpiredLink 14y ago
PHP has no destructors?
- deleted 14y ago[deleted]
- pixelbath 14y agoHow did you get that information from this post? PHP has had destructors in some form since 4.x, and true class destructors in 5.x: http://php.net/manual/en/language.oop5.decon.php http://php.net/manual/en/language.oop5.decon.php
- meritt 14y agoMy guess is he's from the C++ camp who tend to always suggest RAII as a replacement for 'finally' and RAII relies upon destructors.
- chc 14y agoDestructors aren't a good way to free resources in a garbage collected language.
- true_religion 14y agoDoes ref-counting count as garbage collection?
- tomjen3 14y agoI have yet to see a language that actually cleans up after itself. Many will attempt to free memory, but what about files, db connections, windows, sockets?
- reginaldo 14y agoHave you heard about Racket's custodians? [1] http://docs.racket-lang.org/reference/eval-model.html#(part._custodian-model) http://docs.racket-lang.org/reference/eval-model.html#(part....