[Top][All Lists]

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

Memory leaks?

From: Chris Vetter
Subject: Memory leaks?
Date: Mon, 5 Sep 2005 14:11:18 +0200 (MEST)

Hi there,

while testing and playing around with instance counting, I found that a

  void main(void)
    NSAutoreleasePool *pool = nil;

    pool = [[NSAutoreleasePool alloc] init];
      NSObject *o;

      o = [[NSObject alloc] init];
      NSLog(@"--> %@", [o description]);
      [o release];
    [pool release];


gives me a total of 50 instances not accounted for:

./shared_obj/example: Memory leak detected: NSBundle (2), NSRecursiveLock
(2), NSUserDefaults (1), GSArrayEnumerator (35), NSLock (1),
GSArrayEnumeratorReverse (1), GSLazyRecursiveLock (3), NSFileManager (1),
GSNonretainedObjectValue (4)

Removing the NSLog(), I get no leak.
Shouldn't the autorelease pool take care of those instances?


5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++

reply via email to

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