I know someone that has been doing programming for a long time, developed many android games and stuff, and he is insisting that Test1::run causes heating issues after 3-4 hours, but after changing the int i; to a member variable (as seen in Test2::run), the heating issue is fixed. And I don't believe quite him, it just doesn't make sense, it has more instructions. Mentioned behavior is on an android game. I wanted to hear what people here think about this, especially people with experience on older android devices.
class Test1 {
public:
void run() {
for (int i = 0; i < 100; i++) {
std::cout << i;
}
}
};
class Test2 {
public:
void run() {
for (i = 0; i < 100; i++) {
std::cout << i;
}
}
private:
int i;
};
