Skip to content

memory leak #4

@gbbnfhb

Description

@gbbnfhb

--backend.cpp--
void SDL_Mobile_Backend::exitApplication() {

for(std::map<std::string, FlxBackendImage*>::iterator it = images.begin(); it != images.end(); it++) {
	if(it->second) {
		SDL_Image *img = (SDL_Image*)it->second;

		if(img->texture) SDL_DestroyTexture(img->texture);
		delete img;
	}
}
    images.clear();  //<--- 

It's often forgotten, but while the contents of the container are deleted, the container itself is not

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions