* nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
authorJan Djärv <jan.h.d@swipnet.se>
Tue, 21 Aug 2012 20:50:31 +0000 (22:50 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Tue, 21 Aug 2012 20:50:31 +0000 (22:50 +0200)
the loop.

Fixes: debbugs:12247

src/ChangeLog
src/nsterm.m

index ffd706a..7940689 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-21  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
+       the loop (Bug#12247).
+
 2012-08-21  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lisp.h (vcopy): Use memcpy rather than our own loop.
index 3ab9358..12ca526 100644 (file)
@@ -4600,11 +4600,15 @@ not_in_argv (NSString *arg)
 
   SELECT_TYPE readfds, writefds, *wfds;
   EMACS_TIME timeout, *tmo;
+  NSAutoreleasePool *pool = nil;
 
   /* NSTRACE (fd_handler); */
 
   for (;;) 
     {
+      [pool release];
+      pool = [[NSAutoreleasePool alloc] init];
+
       if (waiting)
         {
           SELECT_TYPE fds;