Fix iOS build: form owned-userdata release callback from a closure literal
Main's iOS build is red since f41507ece2 (an untested "cmux reload-cloud"-authored commit): it passes the static method GhosttySurfaceBridge.releaseRetainedOpaque directly as a C function pointer to ghostty_surface_new_with_owned_userdata, which Swift only permits for global funcs or capture-free closure literals. Every CmuxMobileTerminal compile fails, which killed internal TestFlight run 30139324698 (and blocks all iOS uploads). This wraps the callback in a capture-free closure literal forwarding to the same method; no behavior change. Verified against the language rule and gated on a local GhosttyKit rebuild before merge.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Fixes the iOS build by forming the owned-userdata release callback as a capture‑free closure literal when calling ghostty_surface_new_with_owned_userdata instead of passing the static method reference. This follows Swift’s C function pointer rules and restores CmuxMobileTerminal iOS builds and TestFlight uploads with no behavior change.
Summary by CodeRabbit
- Bug Fixes
- Improved surface cleanup callback handling to ensure resources are released reliably when a terminal surface is closed.