mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
More careful NSAutoreleasePool management
This commit is contained in:
parent
4a04328be2
commit
0d6f17afe2
@ -22,18 +22,12 @@ static NSAutoreleasePool * pool = nil;
|
||||
NSMutableSet * keys;
|
||||
}
|
||||
|
||||
+ (void)load;
|
||||
- (LyXLinkBackClient *)init;
|
||||
- (BOOL)edit:(NSString *)fileName;
|
||||
@end
|
||||
|
||||
@implementation LyXLinkBackClient
|
||||
|
||||
+ (void)load
|
||||
{
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
}
|
||||
|
||||
- (LyXLinkBackClient *)init
|
||||
{
|
||||
self = [super init];
|
||||
@ -233,10 +227,14 @@ int editLinkBackFile(char const * docName)
|
||||
|
||||
void closeAllLinkBackLinks()
|
||||
{
|
||||
[linkBackClient release];
|
||||
linkBackClient = nil;
|
||||
|
||||
[pool drain];
|
||||
pool = nil;
|
||||
if (linkBackClient != nil) {
|
||||
[linkBackClient release];
|
||||
linkBackClient = nil;
|
||||
}
|
||||
|
||||
if (pool != nil) {
|
||||
[pool drain];
|
||||
pool = nil;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user