2012-05-26 14:08:15 -06:00
|
|
|
/*
|
|
|
|
* MacPool.m
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import "MacPool.h"
|
|
|
|
|
|
|
|
NSAutoreleasePool *thePool;
|
|
|
|
|
|
|
|
int create_pool() {
|
2013-01-02 09:26:30 -07:00
|
|
|
fprintf(stderr,"Creating autorelease pool\n");
|
|
|
|
thePool = [[NSAutoreleasePool alloc] init];
|
|
|
|
return 1;
|
2012-05-26 14:08:15 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
int destroy_pool() {
|
2013-01-02 09:26:30 -07:00
|
|
|
fprintf(stderr,"Draining and releasing autorelease pool\n");
|
|
|
|
[thePool drain];
|
|
|
|
[thePool release];
|
|
|
|
return 0;
|
2012-05-26 14:08:15 -06:00
|
|
|
}
|