Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-10-2009, 02:19 PM   #1 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 15
Default 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
Jecht is offline   Reply With Quote
Old 07-10-2009, 04:36 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 2,577
Default

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
__________________
smasher is offline   Reply With Quote
Old 07-13-2009, 10:03 AM   #3 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 15
Default

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 View Post
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
Jecht is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,353
Threads: 39,148
Posts: 171,625
Top Poster: smasher (2,577)
Welcome to our newest member, pyrrho
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0