Source

Fireplace / main.m

Full commit
#import "FPEventLoop.h"
#import "FPWindowManager.h"

static FPWindowManager * wm = nil;

void cleanup()
{
	[wm release];
}

int main(int argc, char **argv)
{
	NSAutoreleasePool * pool = [NSAutoreleasePool new];

	atexit(cleanup);

	NSLog(@"FIREPLACE - Starting");
	FPWindowManager * t = [FPWindowManager new];
	if(!t)
	{
		[pool release];
		return 1;
	}

	wm = t;

	[[FPEventLoop mainLoop] run];
	[[FPEventLoop mainLoop] release];

	[wm release]; wm = nil;
	[pool release];
	return 0;
}