[Cocoa-sharp] SDL application won't quit
mike stedman
ravuya at gmail.com
Tue Jun 12 21:46:14 EDT 2007
Hi all,
I recently tried building a Tao.Sdl application on OS X, and am
required to use Cocoa# since SDL depends on it on OS X. This means I
have to create an AutoreleasePool, otherwise the application complains
and refuses to open a CGSWindow. Later, I discovered that the
Application class can set up its own pool, so I'm using that for the
time being.
The problem is that when my program finishes at the end of the main()
function, the application won't quit. I've macpacked it as a cocoa
application, and the console just constantly emits messages along
these lines:
Runtime Performance:
CacheHits: 0
CacheHitBadType: 0
ConstructorHits: 0
NativeToManagedHits: 0
ImplementMethodHits: 0
ConstructManagedObjectHits: 0
TypeWalks: 0
The code in question looks pretty much like this:
public void Run() {
Application.Init();
NSApplicationLoad();
Sdl.SDL_Init(Sdl.SDL_INIT_EVERYTHING);
Sdl.SDL_SetVideoMode(640, 480, 32, flags);
// Rest of program...
I'm assuming that it releases itself, since Mono claims that Release()
and Dispose() are not valid methods to call on an AutoreleasePool or
Application. Even Environment.Exit won't quit the program, and I don't
want to have to use Process.Kill.
Any insight into what's going wrong? I've built Tao.Sdl applications
that quit fine before.
Thanks in advance.
--
Mike
http://rav.realitybytes.tk
More information about the Cocoa-sharp
mailing list