Sha256: 4735e7f90492d0152a88c1fabcecc6f37d5ad751aaf9f9c968bb128d69a61809
Contents?: true
Size: 685 Bytes
Versions: 7
Compression:
Stored size: 685 Bytes
Contents
// -*- objc -*- #include "reflex/reflex.h" #import <Cocoa/Cocoa.h> #include "reflex/exception.h" #import "app_delegate.h" namespace Reflex { namespace global { static NSAutoreleasePool* pool = nil; }// global bool initialized () { return global::pool; } void init () { if (global::pool) reflex_error(__FILE__, __LINE__, "already initialized."); global::pool = [[NSAutoreleasePool alloc] init]; [[NSApplication sharedApplication] setDelegate: [[[AppDelegate alloc] init] autorelease]]; } void fin () { if (!global::pool) reflex_error(__FILE__, __LINE__, "not initialized."); [global::pool release]; global::pool = nil; } }// Reflex
Version data entries
7 entries across 7 versions & 1 rubygems