bug-gnustep
[Top][All Lists]
Advanced

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

NSAutoreleasePool changes and threads


From: Enrico Sersale
Subject: NSAutoreleasePool changes and threads
Date: Sun, 06 Mar 2005 15:26:16 +0200


I've just updated from CVS and I'm getting some errors and crashes with apps 
using threads. This is visible in GWorkspace and in older versions of GNUMail. 
I've not other examples.
The code detaching the threads has nothing strange; it is equal to the examples 
in the apple documentation.
It seems that the bug is in -dealloc; changing only this method with an older 
version fixes it.
I don't know if this makes sense and can help but, re-adding this:

  {
    NSAutoreleasePool **cp;

    /* Uninstall ourselves as the current pool; install our parent pool. */
    cp = &(tv->current_pool);
    *cp = _parent;
    if (*cp)
      (*cp)->_child = nil;

    /* Don't deallocate ourself, just save us for later use. */
    push_pool_to_cache (tv, self);
  }

at the end of -dealloc fixes (partially) the problem.
I say "partially" because I get anyway some "autorelease called without pool for object 
(83669d0) of class NSConnection in thread <NSThread: 8365390>" but no crashes.





reply via email to

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