Re: Memory usage: Xcode vs. Instruments, who is right?
Re: Memory usage: Xcode vs. Instruments, who is right?
- Subject: Re: Memory usage: Xcode vs. Instruments, who is right?
- From: Markus Spoettl <email@hidden>
- Date: Sat, 07 Dec 2013 19:22:34 +0100
On 12/7/13 6:45 AM, Han Ming Ong wrote:
thanks a lot for the details. I don't mind if Xcode gets it wrong (or not
as right as Instruments), so long as there's a really reliable way to find
out what the real usage is.
So, just to be absolutely sure: The value in the "All Heap & Anonymous VM"
line (top) in the "Live Bytes" column in the allocations instrument is
showing the real current memory usage, right?
Yes, Instruments shows you how much memory your app is using now.
Xcode’s memory report shows you how much memory is still assigned to your
app. It is good for showing memory usage trends. Here are a couple of
examples
- let’s say your iOS app allows the user to select and show a photo. Before a
new photo is shown, you make sure that there are no strong pointers to the
old photo. But yet, every time a new photo is shown, the Xcode memory report
shows that memory usage is monotonously increasing.
- you have noticed that your iOS app memory usage is about 500MB after a
certain user test scenario. But after a major refactoring, it has jumped 20%
to 600MB, doing the exact user test scenario.
In both examples, Xcode lets know you that something is probably wrong with
your memory management. Because you know your code well, you may be able to
figure out the problem by reviewing your code. If not, you can easily launch
Instruments and look at the allocation/deallocation patterns.
Hope that answers your question.
Yes it does, thanks very much!
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden