pixelherodev commented on PR #578: URL: https://github.com/apache/arrow-go/pull/578#issuecomment-3573819862
> ``` > cleanup func() > ``` > > Using a cleanup function (or closure) may well be the best approach. I can play around with that instead and see if we like that more? It means not needing to manually track the graph at all, because the function is invoked on release time but defined at creation time; it can take a closure of the object itself, and check whether fields needs unreferenced without any of the typing shenanigans.. One worry I have: I'll need to check if the compiler can optimize out the _construction of the closure_, since it won't actually be used. The current approach generates zero code when disabled, I want to make sure we can maintain that property... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
