iphone - Is it right code or not? -


i new iphone development. here code :

- (void)setimage:(uiimage *)image imagekey:(nsobject *)imagekey {      nsnumber *number=(nsnumber*)imagekey;     int num=[number intvalue];         uiscrollview *scrollviewfamily=(uiscrollview*)[scrollviewprofile viewwithtag:6];         uibutton *btnphoto=(uibutton*)[scrollviewfamily viewwithtag:num];         [btnphoto setimage:image forstate:uicontrolstatenormal];          photo *aphoto= [appdata.currentuser.familylistarray objectatindex:num-1000];         aphoto.photoimg=image;  } 

scrollview retaincount 3,for button 2 , aphoto 1. question is right write ?if yes how release these objects? me.thanking you...

all lines pointer memory resource, no memory leak. have release memory when alloc it, use "autorelease", make life easier.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -