4 ms·
> Probably C would do just as fine, assuming you have some static analysis tool to find all the forgotten free calls. I don't believe such a static analysis to
by pcwalton 13y ago
> Probably C would do just as fine, assuming you have some static analysis tool to find all the forgotten free calls.
I don't believe such a static analysis tool can exist without being a different language (e.g. Cyclone). There just isn't enough information about ownership semantics in C's type system.
- mcguire 13y agoCough, cough, Rust?[1] [1] http://static.rust-lang.org/doc/0.8/rust.html#memory-boxes http://static.rust-lang.org/doc/0.8/rust.html#memory-boxes
- pkolaczk 13y agoIn cases, where unique_ptr is enough, ownership is simple and statically pairing all mallocs with frees is easy. The whole problem with memory management is sharing ownership. Then things start getting hairy.