destroyExecutor :: Executor -> IO ()
destroyExecutor e = do
  c_destroyExecutor $ executorImpl e
  freeHaskellFunPtr $ rawExecutorRegistered e
  freeHaskellFunPtr $ rawExecutorReRegistered e
  freeHaskellFunPtr $ rawExecutorDisconnected e
  freeHaskellFunPtr $ rawExecutorLaunchTask e
  freeHaskellFunPtr $ rawExecutorTaskKilled e
  freeHaskellFunPtr $ rawExecutorFrameworkMessage e
  freeHaskellFunPtr $ rawExecutorShutdown e
  freeHaskellFunPtr $ rawExecutorErrorCallback e
destroyExecutor :: Executor -> IO ()
destroyExecutor e = do
  c_destroyExecutor $ executorImpl e
  freeHaskellFunPtr $ rawExecutorRegistered e
  freeHaskellFunPtr $ rawExecutorReRegistered e
  freeHaskellFunPtr $ rawExecutorDisconnected e
  freeHaskellFunPtr $ rawExecutorLaunchTask e
  freeHaskellFunPtr $ rawExecutorTaskKilled e
  freeHaskellFunPtr $ rawExecutorFrameworkMessage e
  freeHaskellFunPtr $ rawExecutorShutdown e
  freeHaskellFunPtr $ rawExecutorErrorCallback e
destroyExecutor e = do
  c_destroyExecutor $ executorImpl e
  freeHaskellFunPtr $ rawExecutorRegistered e
  freeHaskellFunPtr $ rawExecutorReRegistered e
  freeHaskellFunPtr $ rawExecutorDisconnected e
  freeHaskellFunPtr $ rawExecutorLaunchTask e
  freeHaskellFunPtr $ rawExecutorTaskKilled e
  freeHaskellFunPtr $ rawExecutorFrameworkMessage e
  freeHaskellFunPtr $ rawExecutorShutdown e
  freeHaskellFunPtr $ rawExecutorErrorCallback e