diff options
| author | Teddy Wing | 2016-11-18 23:14:04 -0500 |
|---|---|---|
| committer | Teddy Wing | 2016-11-18 23:14:04 -0500 |
| commit | 4a5d68ef73f44536feb38bb5033fe190b9b7a813 (patch) | |
| tree | ec65131f22347a0ed723c30ac5d3093b9ada7d23 /Low Battery Yup d/AppDelegate.h | |
| parent | 678f8ca1a961eb9125aa82b7d2277fda4db7f146 (diff) | |
| download | Low-Battery-Yup-4a5d68ef73f44536feb38bb5033fe190b9b7a813.tar.bz2 | |
AppDelegate: Only allocate one `Mouse` instance in app lifecycle
Don't keep allocating and releasing `Mouse` objects when the hotkey is
pressed. Instead, allocate a single instance to use for the entire run
time of the application.
Diffstat (limited to 'Low Battery Yup d/AppDelegate.h')
| -rw-r--r-- | Low Battery Yup d/AppDelegate.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Low Battery Yup d/AppDelegate.h b/Low Battery Yup d/AppDelegate.h index 10f6e4b..700c26b 100644 --- a/Low Battery Yup d/AppDelegate.h +++ b/Low Battery Yup d/AppDelegate.h @@ -7,8 +7,11 @@ // #import <Cocoa/Cocoa.h> +#import "Mouse.h" -@interface AppDelegate : NSObject <NSApplicationDelegate> +@interface AppDelegate : NSObject <NSApplicationDelegate> { + Mouse *_mouse; +} - (void)dismissLowBatteryWarning:(NSEvent *)hotKeyEvent; |
