summaryrefslogtreecommitdiff
path: root/src/buffer_manager.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-08-12 19:24:09 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-08-12 19:24:09 +0100
commit2204b7cf0667cc1124606c9882aba82dcf650fc3 (patch)
tree8a892df4dbf8cacc8178f12ced9a61570e463750 /src/buffer_manager.hh
parente2b3dd0ca4b71fd7cfcceeba35b97497631e72bd (diff)
Defer deletion of buffers to after the event loop
We can have SelectionList in flights on the buffer, so mark it for deletion by moving it in a buffer trash, and effectively delete it later, at a point where there should not be any further access to it.
Diffstat (limited to 'src/buffer_manager.hh')
-rw-r--r--src/buffer_manager.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buffer_manager.hh b/src/buffer_manager.hh
index cd7029ea..474833c4 100644
--- a/src/buffer_manager.hh
+++ b/src/buffer_manager.hh
@@ -37,8 +37,10 @@ public:
CandidateList complete_buffer_name(StringView prefix,
ByteCount cursor_pos = -1);
+ void clear_buffer_trash();
private:
BufferList m_buffers;
+ BufferList m_buffer_trash;
};
}