discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of NSZoneStat()


From: Richard Frith-Macdonald
Subject: Re: Use of NSZoneStat()
Date: Fri, 9 Mar 2018 18:42:14 +0000


> On 9 Mar 2018, at 17:08, amon <address@hidden> wrote:
> 
> It may be the case that the malloc scene is confused and lacks
> standards, but the ability to debug leaks with a simple test
> like this has been a long standing and very serious problem
> with Objective C, to the point that I have my doubts there is
> any significant size program written in the language that is not
> silently leaking like a sieve.

Very few ObjC programs have big issues with malloc/free since they simply don't 
use them directly very much ... heap memory is generally associated with 
objects and dealt with by the retain/release/autorelease mechanism.
There *are* lots of features for management and reporting of object lifetimes 
etc which provide much more detailed/useful information than NSZoneStat() about 
object allocation/deallocation.
But, I agree that having a nice report of malloc stats is really useful in the 
specific cases wher you are writing code that does lots of messing with heap 
memory not associated with objects.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]