Open kolmodin opened 7 years ago
I have the same question. I thought the finalizer would be used in default out marshaller. But it is just newForeignPtr_
. Unless GHC would call the finalizer itself, I think there is something wrong and has this function correctly working.
Using
C->Haskell Interface Version C->Haskell Compiler, version 0.28.1 Switcheroo, 1 April 2016
I'm defining a pointer
However, the finalizer is only added in
{#fun#}
declarations in the same file. Fun declarations in other files don't get the finalizer.The
.chi
file doesn't mention the finalizer function.