2004-08-31 09:50:44 UTC
I am a developper of a large "machine learning" library (see
www.torch.ch). Until now, we were using C++, but for many reasons we would
like to switch to Objective-C. Preliminary comparisons showed that
performances of Objective-C and GNUstep-foundation for our problems is
However, one of my main concern is debugging facilities in Objective-C. We
used to employ valgrind (http://valgrind.kde.org/) a lot (in particular
for leak problems detection). Unfortunately, it seems that many small
leaks occurs when using GNUstep (see in attachment the output of valgrind,
for the base example dictionary.m). Some leaks are related to the objc
library, some to the ld library, and some to the GNUstep library.
Many of these leaks are not really important (it is for example memory
allocated in NSObject:initialize only once, or memory allocated for the
locales in NSProcessInfo) but still, it becomes quickly annoying to find
our own memory problem with such an output.
Also, it seems that valgrind is lost with the Objective-C object
allocation: if we do not free an object, valgrind seems not to see the
correct line in the code where the object was allocated.
Are you guys using valgrind with GNUstep, and if yes, how do you deal with
memory leaks detection? Do you believe that the memory leaks mentioned
above will be corrected in the near future?