Brian Hulley wrote:
Since Begin would be a function exported by the DLL, Windows would ensure
that the DLL was loaded when it is first called from your application if
it
was not already loaded so there would be no need for an explicit call to
LoadLibrary.
and then End
Simon Peyton-Jones wrote:
Dear SevenThunders (if that is how you like to addressed)
Thanks for extracting a small program that exhibits the leak; that is
really helpful. We'll look into it. Would you like to create a Trac bug
and attach your files?
Simon
You can call me
I'm not sure if this is a bug, but it sure seems that way to me. When using
the wrapper technique for creating a Haskell callback function it seems
that freeHaskellFunPtr is not properly freeing the resource.
Here is an example program
leaky.hs
module Main where
import Foreign
import
Michael Marte wrote:
I am still using ghc 6.4.2 for creating my DLL and, as long as the DLL
does not open a file, releasing the DLL works fine. I have not yet tried
ghc 6.5.
Michael
I just tried it under GHC 6.6 with the same results. If the DLL is loaded it
crashes when it's
SevenThunders wrote:
I just tried it under GHC 6.6 with the same results. If the DLL is loaded
it crashes when it's unloaded even if no Haskell code is actually
executed.
Here is the promised simple example. This example will cause an exception
when the DLL is unloaded