What is a “memory leak” in terms of video games?

606 viewsOtherTechnology

What is a “memory leak” in terms of video games?

In: Technology

18 Answers

Anonymous 0 Comments

Imagine a game like Flappy Bird.

You fly a bird and randomly generated obstacles keep flying towards you.

Now, information about those obstacles (for example, the size of the obstacle) needs to be stored somewhere on the computer.

As the game goes on, more and more obstacles appear, basically infinitely until you lose the game.

In a well programmed game, you would write a line of code instructing the computer to delete information about the obstacles that you flew by and are no longer visible on the screen because that information is no longer needed.

But, if you’re not such a good programmer, you might forget to delete the information about obstacles. Each time a new obstacle appears, information about it gets stored, but that information never gets deleted. So, the longer you play the game, the more information you have stored in the memory, it just piles up and eventually starts causing problems like lack of memory space.

Basically like a box that you constantly keep putting items in, but never take anything out. Eventually you run out of space and you’re in trouble.

You are viewing 1 out of 18 answers, click here to view all answers.