Skip to content

Conversation

@gary-sweet
Copy link
Contributor

Description

The 'textures' vector wasn't being cleaned up, resulting in 32 blocks of device memory being left initialized.

General Checklist:

Please ensure the following points are checked:

  • My code follows the coding style
  • I have reviewed file licenses
  • I have commented any added functions (in line with Doxygen)
  • I have commented any code that could be hard to understand
  • My changes do not add any new compiler warnings
  • My changes do not add any new validation layer errors or warnings
  • I have used existing framework/helper functions where possible
  • My changes do not add any regressions
  • I have tested every sample to ensure everything runs correctly
  • This PR describes the scope and expected impact of the changes I am making

Note: The Samples CI runs a number of checks including:

  • I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
  • My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions

If this PR contains framework changes:

  • I did a full batch run using the batch command line argument to make sure all samples still work properly

The 'textures' vector wasn't being cleaned up
@gary-sweet gary-sweet requested a review from a team November 11, 2024 13:50
Copy link
Contributor

@asuessenbach asuessenbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're fixing memory leaks...
Shouldn't the images, image_views, the sampler and the base_descriptor_set be destroyed/freed as well?

@gary-sweet
Copy link
Contributor Author

While you're fixing memory leaks... Shouldn't the images, image_views, the sampler and the base_descriptor_set be destroyed/freed as well?

Well, my memory leak detector hasn't shown those up, so not in this PR at least.

@asuessenbach
Copy link
Contributor

Indeed, there are no validation layer issues with the images and those other resources!
And an API Dump tells me, vkDestroyImage is called for those images.
But I don't get where.

@SaschaWillems
Copy link
Collaborator

The sample uses the profiles library for instance setup, so no validation here. I'll look into it.

The PR itself LGTM. Nice catch :)

@SaschaWillems SaschaWillems self-requested a review November 13, 2024 16:28
@marty-johnson59 marty-johnson59 merged commit 70f2fd9 into KhronosGroup:main Nov 18, 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 this pull request may close these issues.

4 participants