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: Match deallocation for allocators #1205

Merged
merged 1 commit into from
Sep 30, 2023
Merged

fix: Match deallocation for allocators #1205

merged 1 commit into from
Sep 30, 2023

Conversation

EmosewaMC
Copy link
Collaborator

Currently on line 116 of AssetManager.cpp, we have the following *data = (char*)malloc(*len);
however on line 45 of AssetManager.h we have delete m_Base; which is not the same allocator as we used to allocate the memory. This PR matches the deallocation to use the correct allocator type.

Tested that valgrind no longer reports errors about mis-matched allocators/free, delete etc.

Currently on line 116 of AssetManager.cpp, we have the following
`*data = (char*)malloc(*len);`
however on line 45 of AssetManager.h we have `delete m_Base;` which is not the same allocator as we used to allocate the memory.
This PR matches the malloc and free to be the correct calls.
@aronwk-aaron aronwk-aaron merged commit a8820c1 into main Sep 30, 2023
3 checks passed
@aronwk-aaron aronwk-aaron deleted the Match-allocators branch September 30, 2023 23:48
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 this pull request may close these issues.

3 participants