It isn’t specific to video games, but rather computing in general.
Basically, when a program saves data, there’s a place it’s designated to save it to. If that area is full, it’s supposed to either find data that can be deleted in that area to be replaced, or fail to save the data at all.
A memory leak is when instead of doing either if those, it just saves the data in the next spot in data that it thinks it’s allowed to save in, but actually, it overwrites important data that is supposed to be outside of that designated zone.
Imagine our memory has 10 spots for data, numbered 1-10
Slots 9 and 10 hold important information that isn’t supposed to be changed
Slots 1-8 hold data that changes all the time, and start empty
The program goes off, doing things and it fills slot 1, then 2, and so on. Once it fills slot 8, without emptying any other slot, we are in danger of a memory leak. If the program doesn’t check if it’s about to fill slot 9, where it’s not supposed to be, it will just fill that slot, overwriting the data that it’s not supposed to. Everything will work fine until the program needs the data that’s supposed to be in slot 9. It instead loads the data we put there, so the program will take the wrong action because it read the wrong data.
It could also encounter an issue if it fills slot 10, and then tries to fill slot 11, which doesn’t exist. If this goes on long enough, it can overwrite something critical to the system’s operation
Latest Answers