Re: Problem exporting Haskell to C via a DLL in GHC 6.6

2007-02-06 Thread SevenThunders
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

RE: Memory leak in FFI callback: GHC 6.6

2006-11-03 Thread SevenThunders
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

Memory leak in FFI callback: GHC 6.6

2006-11-02 Thread SevenThunders
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

Re: GHC 6.4.1 and Win32 DLLs: Bug in shutdownHaskell?

2006-10-24 Thread SevenThunders
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

Re: GHC 6.4.1 and Win32 DLLs: Bug in shutdownHaskell?

2006-10-24 Thread SevenThunders
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