aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m
diff options
context:
space:
mode:
authorMax <dmoagx@users.noreply.github.com>2018-04-29 23:59:56 +0200
committerMax <dmoagx@users.noreply.github.com>2018-04-29 23:59:56 +0200
commit5bd7cde2e69991b5cd9bde424c45e2da5bb34292 (patch)
tree26d0fe949a2184339796eaef86bebc3b730b507a /Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m
parentfc3e74c1e3f650e6efd3ddcce24d9e2c4d37c048 (diff)
downloadsequelpro-5bd7cde2e69991b5cd9bde424c45e2da5bb34292.tar.gz
sequelpro-5bd7cde2e69991b5cd9bde424c45e2da5bb34292.tar.bz2
sequelpro-5bd7cde2e69991b5cd9bde424c45e2da5bb34292.zip
* Formatting and minor code changes
* Fixed a memory leak in CF code
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m13
1 files changed, 5 insertions, 8 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m b/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m
index a7520c2f..8103580b 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m
@@ -30,9 +30,8 @@
#import "SPMySQLKeepAliveTimer.h"
-#import "SPMySQL Private APIs.h"
-@interface SPMySQLKeepAliveTimer (Private_API)
+@interface SPMySQLKeepAliveTimer () // Private API
- (void)_initKeepAliveTimer;
- (void)_forwardPing;
@@ -46,7 +45,7 @@
/**
* Prevent SPMySQLKeepAliveTimer from being init'd normally.
*/
-- (id)init
+- (instancetype)init
{
[NSException raise:NSInternalInconsistencyException format:@"SPMySQLKeepAliveTimers should not be init'd directly; use initWithInterval:target:selector: instead."];
return nil;
@@ -60,7 +59,7 @@
* After initialisation, the delegate should be set to ensure that the timer events
* are received.
*/
-- (id)initWithInterval:(NSTimeInterval)anInterval target:(id)aTarget selector:(SEL)aSelector
+- (instancetype)initWithInterval:(NSTimeInterval)anInterval target:(id)aTarget selector:(SEL)aSelector
{
if ((self = [super init])) {
wrappedTimer = nil;
@@ -96,13 +95,11 @@
- (void)dealloc
{
- [wrappedTimer dealloc];
+ [wrappedTimer release];
[super dealloc];
}
-@end
-
-@implementation SPMySQLKeepAliveTimer (Private_API)
+#pragma mark - Private API
/**
* Set up the timer to tickle the target. This must be set up on the main thread