
31 Dec
2003
31 Dec
'03
5:05 a.m.
On Wednesday 31 Dec 2003 8:56 am, Adrian Hey wrote:
Intended use is something like this...
{-# notInline libXYZRef #-} libXYZRef :: LibRef libXYZRef = unsafePerformIO newLibRef
main :: IO () main = finally (initLibXYZ >> userMain) (killLibRef libXYZRef shutDownLibXYZ) -- initLibXYZ and shutDownLibXYZ are Haskell bindings to functions supplied -- by libXYZ
Actually, using.. main = finally (initLibXYZ >> userMain) (performGC >> killLibRef libXYZRef shutDownLibXYZ) seems to fix the problem, which isn't too surprising I guess. But then again, if this is a reliable solution there's no need for LibRef after all :-) Regards -- Adrian Hey