Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 11-23-2011, 01:02 AM   #1 (permalink)
Registered Member
 
manojb's Avatar
 
Join Date: Jan 2011
Posts: 263
manojb is on a distinguished road
Default Resident Size Management - Performance analysis

Hey guys,

Happy to be back after a long time.

I am tracking the Performance of an application and just wanna clarify a few points.

1. Does cached images ([UIImage imageNamed:@"abc.jpg"]) affect Resident/ Dirty Size ?
2. In some views created from NIB, I found the retainCount of _tableView to be 2 (at viewDidLoad)... How it became 2 (actually it must be 1, right!!!)
3. Does releasing all objects at viewDidUnload/ dealloc do the magic of reducing the Resident Size of the app ?

Hit you later with a few more questions.
__________________
U can not fail, until U Quit...

Manoj B
manojb is offline   Reply With Quote
Old 11-23-2011, 02:22 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 28
Mogglas is on a distinguished road
Default

Quote:
Originally Posted by manojb View Post
Hey guys,

Happy to be back after a long time.

I am tracking the Performance of an application and just wanna clarify a few points.

1. Does cached images ([UIImage imageNamed:@"abc.jpg"]) affect Resident/ Dirty Size ?
2. In some views created from NIB, I found the retainCount of _tableView to be 2 (at viewDidLoad)... How it became 2 (actually it must be 1, right!!!)
3. Does releasing all objects at viewDidUnload/ dealloc do the magic of reducing the Resident Size of the app ?

Hit you later with a few more questions.
1. If you wonder if the image is loaded in the RAM in raw format, i do believe so.
2. If you have a reference to the view, like an IBOutlet, you will have one retain for that, and one more when the view is added as a subview.
3. Should do exactly that.
Mogglas is offline   Reply With Quote
Old 11-23-2011, 03:08 AM   #3 (permalink)
Registered Member
 
manojb's Avatar
 
Join Date: Jan 2011
Posts: 263
manojb is on a distinguished road
Default

Quote:
Originally Posted by Mogglas View Post
1. If you wonder if the image is loaded in the RAM in raw format, i do believe so.
2. If you have a reference to the view, like an IBOutlet, you will have one retain for that, and one more when the view is added as a subview.
3. Should do exactly that.
Thanks First.

1. Could you detail me on that? I get the image content from server's response _data(an NSData). I create an image with imageWithData. Does that load the RAM as you said?

2. Yep, I can find _tableView as an IBOutlet. I forgot that it increases 1 on adding as Subview. Thanks.
3. Clean.
__________________
U can not fail, until U Quit...

Manoj B
manojb is offline   Reply With Quote
Old 11-23-2011, 03:35 AM   #4 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 28
Mogglas is on a distinguished road
Default

Quote:
Originally Posted by manojb View Post
1. Could you detail me on that? I get the image content from server's response _data(an NSData). I create an image with imageWithData. Does that load the RAM as you said?
Well, when you get it as an NSData, it is already in RAM, and when you create a UIImage with that data it will stay get copied once more in RAM until you remove it or it will be purged due to low memory. You should be able to release the NSData right after you initiate the image.

I haven't done any testing on this but it should be quite easy to run with the profiler to see exactly how much memory gets allocated where.
Mogglas is offline   Reply With Quote
Reply

Bookmarks

Tags
allocations, dirty, resident, resident size, vm tracker

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



» Advertisements
» Online Users: 408
16 members and 392 guests
7twenty7, chiataytuday, Clouds, dedeys78, Duncan C, e2applets, EvilElf, iekei, ipodphone, jeroenkeij, leostc, mbadegree, Murphy, QuantumDoja, sacha1996, Sami Gh
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,125
Posts: 402,910
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

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