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

layer: Fix dispatch table memory leak #482

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

aqnuep
Copy link
Contributor

@aqnuep aqnuep commented Aug 16, 2023

The Profiles layer leaks memory on exit because the dispatch tables allocated never get destroyed.

This is observable by running some tests with AddressSanitizer.

The source has destroy_device_dispatch_table and destroy_instance_dispatch_table functions that are supposed to delete these allocations, but they are never called from anywhere.

Instead, this fix simply uses unique_ptrs to make sure that these allocations always get released when the layer is unloaded.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build queued with queue ID 24583.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build # 2706 running.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build # 2706 passed.

@christophe-lunarg christophe-lunarg merged commit f95a7fd into KhronosGroup:main Aug 16, 2023
6 checks passed
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