*smug rustacean noises*
@Kimota94 @slava There are some C++ static analyzers that can help (and IIRC, generally do catch this particular problem fairly consistently).
But, it turns out at retrofitting static checks onto an existing language is much harder (and more heuristic-driven) than making the static checks part of your language.
Rust and Idris compilers can prevent whole classes of bugs, at least until you you _ask_ to be exposed to them. (`unsafe`, `believe_me`, `panic`, `idris_crash`).
But also, trying to move an large existing code base over to a new language is almost always long and painful and very hard to make "value-driven" or reflected in your KPI.
Impressive, very professesque
@slava I think that's one of the joys of using a GC'd language, is not having to manually track all the possible (de)allocation policies when trying to design an API for others to implement.
At least with Rust (which I probably should use more), the compiler tracks that stuff.