3 ms·
The language just gave you a block of memory. It lets you decide whether you'd like to dedicate resources to clearing that memory.
by ChrisAntaki 12y ago
The language just gave you a block of memory. It lets you decide whether you'd like to dedicate resources to clearing that memory.
- mamcx 12y agoOk, so for what is usefull to have garbage after get memory?
- J_Darnley 12y agoWhy do I need to zero an image array if I am about render something into it? You spend time setting each byte to zero.
- JoeAltmaier 12y agoThat, and when your constructor is going to initialize every field, and when you're going to clone a copy of another structure...
- mamcx 12y agoI understand if I get null/empty... but garbage? And in relation to this post, the behaviour is not the same across compilers/archs? Thats nuts.
- notacoward 12y agoWelcome to programming in the real world. If that's the nuttiest thing you have to deal with on any given day, it's a good day.
- mamcx 12y agoYep, I know programing is hard. +18 years of it. Is crazy the amount of punishment a developer accept, and when the fail is elsewhere, it blame itself ;)