diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-01-09 09:36:10 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-01-09 09:36:10 -0800 |
commit | 35cf62d95cdcd5323dcea4a5385942c342ff1d9c (patch) | |
tree | 90358cbb033a126c4d48793a80fd804b7baaca24 /src/emacs.c | |
parent | 59815c02506eb39b61e672528ed03885749ba529 (diff) | |
parent | 7655cb66d86564e792b825f1a0e1a4de7d6e6db5 (diff) | |
download | emacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.tar.gz emacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.tar.bz2 emacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.zip |
Merge from trunk.
Diffstat (limited to 'src/emacs.c')
-rw-r--r-- | src/emacs.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/emacs.c b/src/emacs.c index 6c96f7eb5e3..b8abcef6cbd 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1,6 +1,6 @@ /* Fully extensible Emacs, running on Unix, intended for GNU. -Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2011 +Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -98,7 +98,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif static const char emacs_version[] = VERSION; -static const char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc."; +static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; /* Make these values available in GDB, which doesn't see macros. */ @@ -321,6 +321,12 @@ static void (*fatal_error_signal_hook) (void); pthread_t main_thread; #endif +#ifdef HAVE_NS +/* NS autrelease pool, for memory management. */ +static void *ns_pool; +#endif + + /* Handle bus errors, invalid instruction, etc. */ #ifndef FLOAT_CATCH_SIGILL @@ -1318,7 +1324,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args); #ifdef HAVE_NS - ns_alloc_autorelease_pool (); + ns_pool = ns_alloc_autorelease_pool (); if (!noninteractive) { #ifdef NS_IMPL_COCOA @@ -2015,6 +2021,10 @@ all of which are called before Emacs is actually killed. */) shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil); +#ifdef HAVE_NS + ns_release_autorelease_pool (ns_pool); +#endif + /* If we have an auto-save list file, kill it because we are exiting Emacs deliberately (not crashing). Do it after shut_down_emacs, which does an auto-save. */ |