So I decided to move my tile textures onto a spritesheet instead of having separate images. So I loaded the spritesheet texture to the sprite of my tile, set the textureRect of that sprite and this bug occurs.
I believe that the TextureRect is leaking, and here's why:
As I'm moving my character vertically, these spaces between tiles occasionally flickers (Took me ages to actually get one of these flickers on picture). For the record, this did NOT happen when I had separate textures. And I believe that the reason to why the lines are black/yellow is because my spritesheet looks like this:
The tiles below the ground tiles are just there so I can distinguish the tiles easier, and no, I haven't finished the tile textures, that's why the same tile is looped all over the tiles on the spritesheet. Anyway, as you can see the edges around the tiles below the "ground" tiles are indeed yellow and black, which the flickering lines in the game are.
Is this a bug or am I doing something wrong? Should I create separate textures from the spritesheet and store them in a vector or such?