Skip to content

Comment on Perhaps Rust Needs "Defer"

Comments

This article makes no sense. I don't know why you'd ever think you can allocate a Rust object, pass it to C code, and assume it's safe for that C code to call free() on it. This would be true for any other pair of languages when crossing an FFI boundary.

A possible "defer" keyword has nothing to do with any of this, and will not help you.

Rust doesn't need "defer".

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.