On Sun, Jan 29, 2017, 10:35 AM John Souvestre <j...@souvestre.com> wrote:
> > If you find a piece of code that uses a finaliser for the correct > operation of that program, that code is broken. > > Does that include using a finalizer with CGO code? From what I read, that > seems to be where they are most often used. > > > https://groups.google.com/forum/#!topic/golang-dev/DMiUkpS1uyQ But in the case of using them to free cgo resources, one wouldn't (hopefully) be doing that for correct operation of the program. Just to ensure memory gets freed. If one were doing it to rely on C++ destructors triggering some other important behavior to the program, when a finalizer triggers the destructor, then it would be wrong. > > John > > John Souvestre - New Orleans LA > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.