Full Version: bad habits come back to bite you
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a very bad habit... when defining classes in C++ I often just put the label and type... This is usually ok, since I seldom write release builds.

The reason there's a difference is that in debug builds the compiler usually nulls all variables and clears memory to 0..release builds don't, memory is as it is when it fires up.


I discovered the compiler on the Arm64 Jetson doesn't.......

And it took me 6 hours to work out why, in a demo I was workig on that worked perfectly on 8 other machines, only the Jetson redused to display the 1st of 4 test models........

I had not 0'd a rotation Vec3, and in the update of the model I was rotating assuming 0.....

Bad habits only get broken when you make bad mistakes.... 6 hours though...ooooff.. I should know better.

I have now put default values in all class varibles in the class define.
Two words, "initializer lists".

Is this the Jetson Nano? Do you know the compiler version used on this vs the others? What version of C++ is the compiler compiling to vs the others?

I would have thought this would give a warning if you do not have class variables initialized when derived.
yeah, but normally with debug builds you don't need to worry, I tend to do the initialiser work when I am likely to do a release....but yes... its a bad habit I will now break it.