summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-01 15:40:54 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-01 15:40:54 +0200
commit437bafe4c8a83ed71ee006eda7f54b65a90f0d4c (patch)
treedac9426b1bafe44f050bbb13c027de31117c089d /src/misc2.c
parent580164481924ed8611eb79f0247a0eb1ca0b3b9a (diff)
downloadvim-git-437bafe4c8a83ed71ee006eda7f54b65a90f0d4c.tar.gz
patch 7.4.2137v7.4.2137
Problem: Using function() with a name will find another function when it is redefined. Solution: Add funcref(). Refer to lambda using a partial. Fix several reference counting issues.
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 53469a261..f44c33cea 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1217,16 +1217,20 @@ free_all_mem(void)
if (delete_first_msg() == FAIL)
break;
-# ifdef FEAT_EVAL
- eval_clear();
-# endif
# ifdef FEAT_JOB_CHANNEL
channel_free_all();
- job_free_all();
# endif
#ifdef FEAT_TIMERS
timer_free_all();
#endif
+# ifdef FEAT_EVAL
+ /* must be after channel_free_all() with unrefs partials */
+ eval_clear();
+# endif
+# ifdef FEAT_JOB_CHANNEL
+ /* must be after eval_clear() with unrefs jobs */
+ job_free_all();
+# endif
free_termoptions();