Return to site

Sdl2 load png

broken image
broken image

What I'm trying to get at is we've been leaking memory all this time.

broken image

Everything is manually done including resource management. Typically in C, when a function returns a pointer, it usually means there was something dynamically allocated and the pointer to it was returned back to you. This means it heavily relies on pointers and passing pointers around.

broken image

Before we start this next part, we need to have a little talk about resource management in SDL2.

broken image