mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Fixed memory leaks in non-gui tests
Fixed 2 memory leaks in production code and a few in testcases. As a result leak_check_at_exit ASAN option does not need to turned off for non-gui tests. Smart pointers should be used elsewhere for consistency, but the sooner this fixes are delivered, the lesser memory leaks are introduced.
This commit is contained in:
committed by
Janek Bevendorff
parent
b20918b60e
commit
0ff75e7a88
@@ -22,6 +22,7 @@
|
||||
#include <QObject>
|
||||
#include <QFile>
|
||||
#include <QTemporaryFile>
|
||||
#include <QScopedPointer>
|
||||
|
||||
#include "core/CsvParser.h"
|
||||
|
||||
@@ -37,7 +38,6 @@ private slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
|
||||
void testUnicode();
|
||||
void testLF();
|
||||
@@ -62,8 +62,8 @@ private slots:
|
||||
void testColumns();
|
||||
|
||||
private:
|
||||
QTemporaryFile* file;
|
||||
CsvParser* parser;
|
||||
QScopedPointer<QTemporaryFile> file;
|
||||
QScopedPointer<CsvParser> parser;
|
||||
CsvTable t;
|
||||
void dumpRow(CsvTable table, int row);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user