Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
I am trying to implement iAds (onto a view controller) into one of my apps and I am encountering a couple small memory leaks. My ADBannerView displays correctly and hides correctly. However when I test my application on my device with instruments I get a few small memory leaks.
I get about 5 "NSCFString" leaked objects at 16 bytes a piece. The responsible library is Foundation...but knowing that Foundation really does not have any bugs I know it has to do with my code. Also, I know the leaks have to do with iAd, because when I take out all of the iAd code and test...I get no memory leaks.
I do not believe the leaks are because I have it set to autorelease. Maybe the ViewDidLoad is being called multiple times? When using instruments what usually happens is the application starts running and a few seconds later the ADBannerView is displayed and then I get the "NSCFString" leaks. Also this view controller is the first one displayed when launching the application.
I have been trying multiple things the past couple of days and ultimately I go back to my initial code.
Has anyone else encountered this? Is it just be a problem with the iAd framework since the leaks are so small?
I followed the Apple tutorial on how to implement iAd's to the T. I too am having the same issue, have been messing with it for days and going crazy. If I comment out iAd, no leaks. I have been releasing on viewDidUnload. Have you found out anything more?
- (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; if (bannerView) { bannerView.delegate = nil; [bannerView release]; } }
Hi u need to release the adView variable twice, since in .h file u retain it and in viewdidload in .m file u used alloc again. so u need to release twice. Don know it works. Let me know the result. All the best.
I am trying to implement iAds (onto a view controller) into one of my apps and I am encountering a couple small memory leaks. My ADBannerView displays correctly and hides correctly. However when I test my application on my device with instruments I get a few small memory leaks.
I get about 5 "NSCFString" leaked objects at 16 bytes a piece. The responsible library is Foundation...but knowing that Foundation really does not have any bugs I know it has to do with my code. Also, I know the leaks have to do with iAd, because when I take out all of the iAd code and test...I get no memory leaks.
I do not believe the leaks are because I have it set to autorelease. Maybe the ViewDidLoad is being called multiple times? When using instruments what usually happens is the application starts running and a few seconds later the ADBannerView is displayed and then I get the "NSCFString" leaks. Also this view controller is the first one displayed when launching the application.
I have been trying multiple things the past couple of days and ultimately I go back to my initial code.
Any help would be appreciated.
Looks like you're retaining the iAD in the synthesized property and the retain count is also incremented when you add it to the view. Also, I don't see any explicit release statements. Autoreleasing an object will only call release for you once.
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI too am having the same issue, have been messing with it for days and going crazy. If I comment out iAd, no leaks.
I have been releasing on viewDidUnload.
Have you found out anything more?
Cheers.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeAny solutions on this?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeQuick question. Are you guys creating a new viewcontroller and all manually?
So I'd like to see the the implementation.
Basically what else did you do to get iAds up and running. What did you do in interface builder and such
apparently releasing the iAd in viewDidUnload instead of dealloc seems to fix the problem
if any of you can help with the iAD's into my project (memory leak or not) I would be willing to pay.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeWhat are the consequences of these memory leaks?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI'm having the same insue and I'm going crazy.
What's the way to fix it?
Thanks
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI want to know if you can solve it. No one?
Thanks
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome