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

Isolate freeing code from generation code #23

Open
diamondburned opened this issue Jul 24, 2021 · 1 comment
Open

Isolate freeing code from generation code #23

diamondburned opened this issue Jul 24, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@diamondburned
Copy link
Owner

C to Go and Go to C conversion routines should be refactored to have the code used to generate freeing statements moved outside into another function. Preferably, the function calling part should be moved out, while the generation code should still generate the right code to call those functions.

Having free functions separately will help implementing HashTable (#20) properly, as that will allow the HashTable to free values easily. It will also help once map[T]T is turned into a no-copy container type instead, preferably once generics is available.

@diamondburned diamondburned added the enhancement New feature or request label Jul 24, 2021
@diamondburned
Copy link
Owner Author

Having struct setters now depends on this issue as well for proper freeing of
old fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant