Skip to content

Conversation

@louist103
Copy link
Contributor

@louist103 louist103 commented Apr 7, 2024

This function allocated memory with _strdup and was never freed.

Build Artifacts

@Archez
Copy link
Contributor

Archez commented Apr 7, 2024

Do we really need to use strdup in the first place?
I think we could just update the WrappedText helper method to return std::string and then just invoke .c_str() off the return value for the ImGui methods, then the std::string will just be cleaned up when scope exits. Seems better than having to remember to call free (which there is a usage of WrappedText in the SaveEditor missing a free as well).

@briaguya0
Copy link
Contributor

i'm down to switch to using std::string. also, can this point to macready?

Copy link
Contributor

@briaguya0 briaguya0 left a comment

Choose a reason for hiding this comment

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

let's wait to merge this until it's doing it the std::string way

@briaguya0
Copy link
Contributor

closing in favor of #4144

@briaguya0 briaguya0 closed this May 10, 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.

3 participants