Skip to content

Commit

Permalink
[iOS] Dont autorelease what we not own
Browse files Browse the repository at this point in the history
  • Loading branch information
krono committed May 29, 2017
1 parent 5dd7668 commit 0f07ffb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
Original file line number Diff line number Diff line change
Expand Up @@ -380,16 +380,16 @@ - (void)flagsChanged:(NSEvent *)theEvent {
self.lastSeenKeyBoardModifierDetails = aKeyBoardStrokeDetails;

@synchronized(self) {
NSEvent* syntheticEvent = AUTORELEASEOBJ([NSEvent keyEventWithType:(isUp ? NSEventTypeKeyUp : NSEventTypeKeyDown)
location:[theEvent locationInWindow]
modifierFlags:(isUp ? oldFlags : [theEvent modifierFlags])
timestamp:[theEvent timestamp]
windowNumber:[theEvent windowNumber]
context:nil
characters:@""
charactersIgnoringModifiers:@""
isARepeat:NO
keyCode:[theEvent keyCode]]);
NSEvent* syntheticEvent = [NSEvent keyEventWithType:(isUp ? NSEventTypeKeyUp : NSEventTypeKeyDown)
location:[theEvent locationInWindow]
modifierFlags:(isUp ? oldFlags : [theEvent modifierFlags])
timestamp:[theEvent timestamp]
windowNumber:[theEvent windowNumber]
context:nil
characters:@""
charactersIgnoringModifiers:@""
isARepeat:NO
keyCode:[theEvent keyCode]];
if (isUp) {
[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordKeyUpEvent: syntheticEvent fromView: self];
} else {
Expand Down
20 changes: 10 additions & 10 deletions platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m
Original file line number Diff line number Diff line change
Expand Up @@ -791,16 +791,16 @@ - (void)flagsChanged:(NSEvent *)theEvent {
self.lastSeenKeyBoardModifierDetails = aKeyBoardStrokeDetails;

@synchronized(self) {
NSEvent* syntheticEvent = AUTORELEASEOBJ([NSEvent keyEventWithType:(isUp ? NSEventTypeKeyUp : NSEventTypeKeyDown)
location:[theEvent locationInWindow]
modifierFlags:(isUp ? oldFlags : [theEvent modifierFlags])
timestamp:[theEvent timestamp]
windowNumber:[theEvent windowNumber]
context:nil
characters:@""
charactersIgnoringModifiers:@""
isARepeat:NO
keyCode:[theEvent keyCode]]);
NSEvent* syntheticEvent = [NSEvent keyEventWithType:(isUp ? NSEventTypeKeyUp : NSEventTypeKeyDown)
location:[theEvent locationInWindow]
modifierFlags:(isUp ? oldFlags : [theEvent modifierFlags])
timestamp:[theEvent timestamp]
windowNumber:[theEvent windowNumber]
context:nil
characters:@""
charactersIgnoringModifiers:@""
isARepeat:NO
keyCode:[theEvent keyCode]];
if (isUp) {
[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordKeyUpEvent: syntheticEvent fromView: self];
} else {
Expand Down

0 comments on commit 0f07ffb

Please sign in to comment.