summaryrefslogtreecommitdiff
path: root/src/proto/channel.pro
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-08 17:07:19 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-08 17:07:19 +0200
commit107e1eef1df3b786ad3ad49fbdb9e058649303b5 (patch)
tree1b645e4de0cc6a8021a5c48ca97897edf7e48adf /src/proto/channel.pro
parentd56374e25df0b317b01423a01f158157faa647fa (diff)
downloadvim-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.pro5
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);