mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
#8637 back port of change 0d6f17af: More careful NSAutoreleasePool management
This commit is contained in:
parent
6cd6de3eb5
commit
e3a56beab3
@ -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 release];
|
||||
pool = nil;
|
||||
if (linkBackClient != nil) {
|
||||
[linkBackClient release];
|
||||
linkBackClient = nil;
|
||||
}
|
||||
|
||||
if (pool != nil) {
|
||||
[pool drain];
|
||||
pool = nil;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user