I’m getting memory leak problem in this code:
UIImage myImage1 = [[UIImage alloc]
initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:strimg1]]];
How can I solve this problem?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Remember that whenever you create an an Object using New or Alloc init,
it is your responsibility to release it in the dealloc. and remember to used super dealloc.
Make sure no other object bump the retain count.
What is in the init method? Did you create another instance of class UIImage? Just a thought.
Hope this help. dibu2z