As programs run, they take in and produce data that is kept in the RAM. Sometimes that data can cause a program to run completely in circles or at least in directions that it’s not supposed to run. By shutting the computer down everything is halted, all the data in the RAM is erased and the program starts anew, with normal data.
It’s like shouting “Fuck this shit! We’re not getting anywhere. Let’s start from the beginning.” and then you start from the beginning and maybe this time things go right.
Latest Answers