Although memory management isn't really a concern in sc2 mapping. You don't need to worry about freeing up memory or anything like that- the only way you might run into issues would be if you declared some excessively large multi-dimensional arrays.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
The title says all. Does a bool type take up 1 full byte or does it take up 1 bit?
Is there a place where I can find how many variables allocate memory? I know byte is 1 byte and int is 4 bytes, but what about game types like units?
In essence a bool is just a 1 or a 0. So it's 4 bytes.
In starcraft, it takes up 32 bits just like any other variable.
In languages like C, it takes up 8 bits.
@DarkRevenantX: Go
What he said.
Although memory management isn't really a concern in sc2 mapping. You don't need to worry about freeing up memory or anything like that- the only way you might run into issues would be if you declared some excessively large multi-dimensional arrays.
Wait, so are ALL variables 4 bytes? I'm using quite a bit of global variables, so I'm trying to see if I can conserve some.