mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix memory leak.
Spotted by Scott. https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg210447.html
This commit is contained in:
parent
fc790bc1f5
commit
b7af21ad7c
@ -336,6 +336,13 @@ void TocModels::updateItem(QString const & type, DocIterator const & dit)
|
||||
models_[type]->updateItem(dit);
|
||||
}
|
||||
|
||||
TocModels::~TocModels(){
|
||||
QHashIterator<QString, TocModel *> iter(models_);
|
||||
while(iter.hasNext()) {
|
||||
iter.next();
|
||||
delete iter.value();
|
||||
}
|
||||
}
|
||||
|
||||
void TocModels::reset(BufferView const * bv)
|
||||
{
|
||||
|
@ -113,6 +113,7 @@ class TocModels : public QObject
|
||||
public:
|
||||
///
|
||||
TocModels();
|
||||
~TocModels();
|
||||
///
|
||||
void reset(BufferView const * bv);
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user