Howdy,
I tried to build a function that would create an auto-freeing function
pointer:
runOnMain :: IO () -> IO ()
runOnMain todo = do
func <- funky
dispatchFunc func
where funky = mkStrCB $ \v -> do
todo
func <- funky
freeHaskellFunPtr func
Unfortunately, I wind up getting:
internal error: iPhoneCreateAdjustor - adjustor pool 'Main_d2K2' is
empty (capacity 32)
(GHC version 6.10.4-iphone-simulator for i386_apple_darwin)
I'm not sure why, but I suspect that funky is being called recursively
and thus stuff is never being freed.
Any hints as to the issue and solutions?
Thanks,
David
--
Lift, the simply functional web framework
http://liftweb.net
Simply Lift
http://simply.liftweb.net
Follow me:
http://twitter.com/dpp
Blog:
http://goodstuff.im