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
Post a Comment