Skip to content

any: rename free() to freeValue() #150

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikitalita
Copy link
Contributor

@nikitalita nikitalita commented Mar 11, 2025

Many C++ projects have their own memory management systems. This is especially the case for games (which often have their own scripting system, which would like to make use of a DAP library to debug them). Often times these games will redefine free via a macro to invoke their own memory mangement functions. If free() gets defined as a macro, attempting to compile any.h will cause the compiler to explode.

I note that this is a private function that is only used within any.h and it's only used twice, so this should not create any API compatibility issues.

Many C++ projects that have their own memory management systems. This is especially the case for games (which often have their own scripting system, which would like to make use of a DAP library to debug them). Often times these games will redefine `free` via a macro to invoke their own memory mangement functions. If `free()` gets defined as a macro, attempting to compile `any.h` will cause the compiler to explode.

I note that this is a private function that is only used within `any.h` and it's only used twice, so this should not create any API compatibility issues.
@nikitalita
Copy link
Contributor Author

@dneto0 any chance of this being merged?

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.

1 participant