- Home /
Question by
Nick4 · May 18, 2014 at 04:26 PM ·
performanceupdatememory
Does using an empty or inactive Update function take up memory?
void Update()
{
if(someBoolVariable)
{
// Some other code snippets
}
}
Will something like this take up memory when someBoolVariable is false? Thanks.
Comment
Best Answer
Answer by getyour411 · May 18, 2014 at 04:33 PM
Yes, an eensie teensie amount for the bool itself
http://stackoverflow.com/questions/204256/why-does-boolean-consume-more-memory-than-char
but any code that can be yanked from Update via design change is good, the best Update is no Update.
And it will also take up processing power if you have Update versus no Update. Again an eensie teensie amount.