gotk4
gotk4 copied to clipboard
Isolate freeing code from generation code
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.
Having struct setters now depends on this issue as well for proper freeing of old fields.