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.
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 oncemap[T]T
is turned into a no-copy container type instead, preferably once generics is available.