Retain connection.

This commit is contained in:
Gregory John Casamento 2020-02-08 03:58:13 -05:00
parent 60cf308471
commit eda8259f53
3 changed files with 2 additions and 122 deletions

View file

@ -24,7 +24,6 @@
#import "GSSpeechRecognitionServer.h"
#import "GSSpeechRecognitionEngine.h"
#import "GSSpeechRecognizer.h"
#import <Foundation/Foundation.h>
static GSSpeechRecognitionServer *_sharedInstance;
@ -40,11 +39,12 @@ static GSSpeechRecognitionServer *_sharedInstance;
{
NSConnection *connection = [NSConnection defaultConnection];
[connection setRootObject: _sharedInstance];
RETAIN(connection);
if (NO == [connection registerName: @"GSSpeechRecognitionServer"])
{
return;
}
// [[NSRunLoop currentRunLoop] run];
[[NSRunLoop currentRunLoop] run];
}
+ (id)sharedServer