Skip to content

[BUGFIX]--Address mem leak in ConfigValue destructor for strings.#1725

Merged
jturner65 merged 1 commit intofacebookresearch:mainfrom
jturner65:Memfix
Apr 14, 2022
Merged

[BUGFIX]--Address mem leak in ConfigValue destructor for strings.#1725
jturner65 merged 1 commit intofacebookresearch:mainfrom
jturner65:Memfix

Conversation

@jturner65
Copy link
Copy Markdown
Contributor

Motivation and Context

This addresses a memory leak in the ConfigValues where non-trivially constructible objects (like strings) were never getting properly disposed of.

Valgrind output before fix :
==22314== LEAK SUMMARY: ==22314== definitely lost: 418,522 bytes in 4,963 blocks

after fix :
==28380== LEAK SUMMARY: ==28380== definitely lost: 13,544 bytes in 42 blocks

How Has This Been Tested

Locally c++ and python tests pass, valgrind's mood definitely improved.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 14, 2022
@jturner65 jturner65 merged commit 1fded2a into facebookresearch:main Apr 14, 2022
@jturner65 jturner65 deleted the Memfix branch April 14, 2022 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants