Close the engine and release resources.
After closing, the engine cannot be used anymore. Prefer using the use extension function for automatic cleanup.