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