Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leaks in DisplayListFactory. #532

Closed
Kenix3 opened this issue Apr 30, 2024 · 0 comments · Fixed by #575
Closed

Fix memory leaks in DisplayListFactory. #532

Kenix3 opened this issue Apr 30, 2024 · 0 comments · Fixed by #575
Assignees
Milestone

Comments

@Kenix3
Copy link
Owner

Kenix3 commented Apr 30, 2024

g.words.w1 = (uintptr_t)malloc(fName.size() + 1);

char* filePath = (char*)malloc(fName.size() + 1);

g.words.w1 = (uintptr_t)malloc(fName.size() + 1);

g.words.w1 = (uintptr_t)malloc(fName.size() + 1);

char* dlPath2 = (char*)malloc(strlen(dlPath.c_str()) + 1);

char* dlPath2 = (char*)malloc(strlen(dlPath.c_str()) + 1);

Nothing ever frees these malloc'd memory blocks. Additionally, we should not be allocating in a Resource unless the destructor frees it. These strings should be held and tracked by the resource.

@Kenix3 Kenix3 added this to the LUS 2.0.0 milestone Apr 30, 2024
@Kenix3 Kenix3 self-assigned this May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant