Why doesn't godot use some sort of c++ memory analyzer for ensuring godot is memory safe? #10534
Replies: 2 comments 1 reply
-
There're some related options you can turn on when building godot. For example, BTW, memory errors are not special. They are just one of the many types of errors an application might encounter. |
Beta Was this translation helpful? Give feedback.
-
So a couple of things that play into this I believe:
For my part my philosophy generally is that memory issues should be something that we shouldn't expect in production code and adding checks for it to release builds is an unnecessary and unwanted expense. Memory errors should be identified during the building process and fixed, and when the engine is used correctly and works correctly they shouldn't happen thanks to checks and design making sure we use memory responsibly. But the feature should still be available during development to be able to catch things, or to pin down bugs easier tl;dr: It isn't an easy problem to solve reliably and uniformly due to the nature of c++ and library support, it is expensive, and shouldn't be needed in production builds if the code is written properly, so for "why isn't there a memory analyzer in release builds/by default" that would be my answer (otherwise the answer is "there is one but you have to turn it on") |
Beta Was this translation helpful? Give feedback.
-
We all know rust is praised for it's memory safety, however it's not really realistic to rewrite the whole godot engine in rust.
So why doesn't use some sort of memory safety analyzer with all warnings as errors?
C# has memory safety analyzers and I heard there is something called val-grind for c++
Sorry if I don't know what I am talking about. it's just a question.
Beta Was this translation helpful? Give feedback.
All reactions