Re: If No Memory Leaks, Is It Good Enough for Memory Management?
Re: If No Memory Leaks, Is It Good Enough for Memory Management?
- Subject: Re: If No Memory Leaks, Is It Good Enough for Memory Management?
- From: Tony Romano <email@hidden>
- Date: Mon, 20 Jun 2011 01:15:59 -0700
- Thread-topic: If No Memory Leaks, Is It Good Enough for Memory Management?
Well, a loose definition for a leak is memory not being referenced anymore
and not returned to the heap manager. However, you can still have large
consumptions of memory while being referenced and it's not considered a
leak by the Leaks tool. BUT, you still have a problem due to your memory
consumption to increase until you run out of virtual space. You need to
use Allocations and use the heap shot Analysis to determine what actions
in your application are causing the heap to grow and track down where the
memory is not being returned to the heap manager.
I'd do a search in Google for Heapshot analysis.
Tony Romano
On 6/20/11 12:28 AM, "Bing Li" <email@hidden> wrote:
>Dear all,
>
>I am still a new programmer of Cocoa. In my program, at least right now,
>there are no memory leaks according to Instruments. Is it good enough for
>memory management?
>
>What I designed is a TCP server which receives TCP messages. When I tested
>it, 200,000 XML were sent to it with a loop without any delays. Each XML
>had
>800 bytes. In this case, no any memory leaks when testing it with
>Instruments. However, according to Activity Monitor, the consumed memory
>was
>increased from 17.9M to more than 400M. Immediately after the sending, the
>consumed memory started to be lowered until it was stopped to 100M. Was it
>normal? Why wasn't it 17.9M eventually?
>
>Thanks so much for your help!
>
>Best,
>greatfree
>_______________________________________________
>
>Cocoa-dev mailing list (email@hidden)
>
>Please do not post admin requests or moderator comments to the list.
>Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
>Help/Unsubscribe/Update your Subscription:
>
>This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden