mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-11 04:34:27 +03:00
BufferManager deletes remaining buffers in his destructor
This commit is contained in:
parent
be47802058
commit
109c11f29c
@ -9,6 +9,13 @@ namespace Kakoune
|
||||
|
||||
struct name_not_unique : logic_error {};
|
||||
|
||||
BufferManager::~BufferManager()
|
||||
{
|
||||
// delete remaining buffers
|
||||
while (not m_buffers.empty())
|
||||
delete m_buffers.begin()->second;
|
||||
}
|
||||
|
||||
void BufferManager::register_buffer(Buffer* buffer)
|
||||
{
|
||||
assert(buffer);
|
||||
|
@ -26,6 +26,8 @@ public:
|
||||
Buffer* operator->() const { return parent_type::operator*().second; }
|
||||
};
|
||||
|
||||
~BufferManager();
|
||||
|
||||
void register_buffer(Buffer* buffer);
|
||||
void unregister_buffer(Buffer* buffer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user