Removed a Static Analyzer Warning about immutable NSNotification object ownership by changing a property from assign to copy.

This commit is contained in:
Donald Alan Morrison 2012-08-20 18:09:51 -07:00
parent 61a5b2a742
commit 7d66f62881
2 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
@property(readwrite, copy) UITextRange *selectedTextRange; @property(readwrite, copy) UITextRange *selectedTextRange;
@property(nonatomic, readonly) id<UITextInputTokenizer> tokenizer; @property(nonatomic, readonly) id<UITextInputTokenizer> tokenizer;
@property(nonatomic, readonly, getter = isKeyboardShown) BOOL isKeyboardShown; @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 */ /** creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */
+ (id) viewWithFrame:(CGRect)frame; + (id) viewWithFrame:(CGRect)frame;
/** creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer */ /** creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer */

View File

@ -243,7 +243,7 @@ static EAGLView *view = 0;
- (void) dealloc - (void) dealloc
{ {
[renderer_ release]; [renderer_ release];
[self.keyboardShowNotification release]; self.keyboardShowNotification = NULL; // implicit release
[super dealloc]; [super dealloc];
} }
@ -825,7 +825,7 @@ static EAGLView *view = 0;
cocos2d::CCIMEDispatcher* dispatcher = cocos2d::CCIMEDispatcher::sharedDispatcher(); cocos2d::CCIMEDispatcher* dispatcher = cocos2d::CCIMEDispatcher::sharedDispatcher();
if (UIKeyboardWillShowNotification == type) if (UIKeyboardWillShowNotification == type)
{ {
self.keyboardShowNotification = [notif copy]; self.keyboardShowNotification = notif; // implicit copy
dispatcher->dispatchKeyboardWillShow(notiInfo); dispatcher->dispatchKeyboardWillShow(notiInfo);
} }
else if (UIKeyboardDidShowNotification == type) else if (UIKeyboardDidShowNotification == type)