diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-04-08 17:07:19 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-04-08 17:07:19 +0200 |
commit | 107e1eef1df3b786ad3ad49fbdb9e058649303b5 (patch) | |
tree | 1b645e4de0cc6a8021a5c48ca97897edf7e48adf /src/proto/channel.pro | |
parent | d56374e25df0b317b01423a01f158157faa647fa (diff) | |
download | vim-git-107e1eef1df3b786ad3ad49fbdb9e058649303b5.tar.gz |
patch 7.4.1719v7.4.1719
Problem: Leaking memory when there is a cycle involving a job and a
partial.
Solution: Add a copyID to job and channel. Set references in items referred
by them. Go through all jobs and channels to find unreferenced
items. Also, decrement reference counts when garbage collecting.
Diffstat (limited to 'src/proto/channel.pro')
-rw-r--r-- | src/proto/channel.pro | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/proto/channel.pro b/src/proto/channel.pro index e4ef00309..d5114cba4 100644 --- a/src/proto/channel.pro +++ b/src/proto/channel.pro @@ -5,7 +5,8 @@ void ch_log(channel_T *ch, char *msg); void ch_logs(channel_T *ch, char *msg, char *name); channel_T *add_channel(void); int channel_unref(channel_T *channel); -void channel_free(channel_T *channel); +int free_unused_channels_contents(int copyID, int mask); +void free_unused_channels(int copyID, int mask); void channel_gui_register_all(void); channel_T *channel_open(char *hostname, int port_in, int waittime, void (*nb_close_cb)(void)); channel_T *channel_open_func(typval_T *argvars); @@ -50,6 +51,8 @@ void free_job_options(jobopt_T *opt); int get_job_options(typval_T *tv, jobopt_T *opt, int supported); channel_T *get_channel_arg(typval_T *tv, int check_open); void job_unref(job_T *job); +int free_unused_jobs_contents(int copyID, int mask); +void free_unused_jobs(int copyID, int mask); void job_set_options(job_T *job, jobopt_T *opt); void job_stop_on_exit(void); void job_check_ended(void); |