From 7d66f62881c3113296ab2e2e18d22e04b3c20431 Mon Sep 17 00:00:00 2001 From: Donald Alan Morrison Date: Mon, 20 Aug 2012 18:09:51 -0700 Subject: [PATCH] Removed a Static Analyzer Warning about immutable NSNotification object ownership by changing a property from assign to copy. --- cocos2dx/platform/ios/EAGLView.h | 2 +- cocos2dx/platform/ios/EAGLView.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos2dx/platform/ios/EAGLView.h b/cocos2dx/platform/ios/EAGLView.h index 5f10b7795e..64c83233ab 100755 --- a/cocos2dx/platform/ios/EAGLView.h +++ b/cocos2dx/platform/ios/EAGLView.h @@ -109,7 +109,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. @property(readwrite, copy) UITextRange *selectedTextRange; @property(nonatomic, readonly) id tokenizer; @property(nonatomic, readonly, getter = isKeyboardShown) BOOL isKeyboardShown; -@property(nonatomic, retain) NSNotification* keyboardShowNotification; +@property(nonatomic, copy) NSNotification* keyboardShowNotification; /** creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */ + (id) viewWithFrame:(CGRect)frame; /** creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer */ diff --git a/cocos2dx/platform/ios/EAGLView.mm b/cocos2dx/platform/ios/EAGLView.mm index 693ad31fdf..52ddaac951 100755 --- a/cocos2dx/platform/ios/EAGLView.mm +++ b/cocos2dx/platform/ios/EAGLView.mm @@ -243,7 +243,7 @@ static EAGLView *view = 0; - (void) dealloc { [renderer_ release]; - [self.keyboardShowNotification release]; + self.keyboardShowNotification = NULL; // implicit release [super dealloc]; } @@ -825,7 +825,7 @@ static EAGLView *view = 0; cocos2d::CCIMEDispatcher* dispatcher = cocos2d::CCIMEDispatcher::sharedDispatcher(); if (UIKeyboardWillShowNotification == type) { - self.keyboardShowNotification = [notif copy]; + self.keyboardShowNotification = notif; // implicit copy dispatcher->dispatchKeyboardWillShow(notiInfo); } else if (UIKeyboardDidShowNotification == type)