gotk4 icon indicating copy to clipboard operation
gotk4 copied to clipboard

Isolate freeing code from generation code

Open diamondburned opened this issue 4 years ago • 1 comments

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 avatar Jul 24 '21 09:07 diamondburned

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

diamondburned avatar Aug 24 '21 05:08 diamondburned