 |
 |
|
 |
07-10-2009, 02:19 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Apr 2009
Posts: 15
|
UIView Transform - Performance Memory issue
Hi All~
I have this animation. Basically the a "pin" image just rotates left and right slowly. Here's my animation code:
- (void)pinAnimation{
// Blah blah calculate rotation
compassPin.superview.transform = CGAffineTransformMakeRotation(PI*rotation);
}
And this animation is called by the timer:
pinAnimationTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
target:self
selector:@selector(pinAnimation)
userInfo:nil repeats:YES];
Using instrument, the memory usage keeps on going up on its own. And the weird thing is, when I remove the compassPin.superview.transform... code, the memory remains constant. Why would this transform add up the memory usage? And how do I fix this?
Thanks so much
|
|
|
07-10-2009, 04:36 PM
|
#2 (permalink)
|
|
Senior Member
iPhone Dev SDK Supporter
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 2,577
|
If it all generalblocks? Your code looks fine, assuming you're only calling scheduledTimerWithTimeInterval once.
Turn on the "Memory Monitor" instrument and see the memory usage of your app is really increasing or not. According to apple, there's a bug in ObjectAlloc that get triggered by quartz calls:
https://devforums.apple.com/message/88251
__________________
|
|
|
07-13-2009, 10:03 AM
|
#3 (permalink)
|
|
Registered Member
Join Date: Apr 2009
Posts: 15
|
Hey~
Thanks for the reply. I only called scheduledTimerWithTimeInterval once but the memory usage is still going crazy. I think I might need to just not have that animation in my app.
Quote:
Originally Posted by smasher
If it all generalblocks? Your code looks fine, assuming you're only calling scheduledTimerWithTimeInterval once.
Turn on the "Memory Monitor" instrument and see the memory usage of your app is really increasing or not. According to apple, there's a bug in ObjectAlloc that get triggered by quartz calls:
https://devforums.apple.com/message/88251
|
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 546 |
| 30 members and 516 guests |
| AdyCoder, akroe17, Alexman, andrei_c, blaa0r23, d_amal, fourtyfour, grzesiek, HemiMG, hfmn, iBumzua, Johanovski, Juan_Garcia, lbergelt, lokidil, melmoup, miloshTheKid, momolgtm, mukesh1204, muzammil, myPhone, noberasco, Nuncha, pant pants, pereorra, preethaAjayan, SirGeraint, swiftmedia, tsfrocks, voelkl25 |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 24,353
Threads: 39,148
Posts: 171,625
Top Poster: smasher (2,577)
|
| Welcome to our newest member, pyrrho |
|