Fix some smally memory leaks reported by valgrind
This commit is contained in:
parent
7ead4ba91e
commit
b12e203572
@ -60,7 +60,7 @@ CloudManager::CloudManager(NymeaConfiguration *configuration, NetworkManager *ne
|
|||||||
config.id = "remote";
|
config.id = "remote";
|
||||||
config.authenticationEnabled = false;
|
config.authenticationEnabled = false;
|
||||||
config.sslEnabled = true;
|
config.sslEnabled = true;
|
||||||
m_transport = new CloudTransport(config);
|
m_transport = new CloudTransport(config, this);
|
||||||
connect(m_awsConnector, &AWSConnector::proxyConnectionRequestReceived, m_transport, &CloudTransport::connectToCloud);
|
connect(m_awsConnector, &AWSConnector::proxyConnectionRequestReceived, m_transport, &CloudTransport::connectToCloud);
|
||||||
|
|
||||||
m_deviceId = m_configuration->serverUuid();
|
m_deviceId = m_configuration->serverUuid();
|
||||||
|
|||||||
@ -58,8 +58,8 @@ private:
|
|||||||
QDBusInterface *m_wiredInterface;
|
QDBusInterface *m_wiredInterface;
|
||||||
|
|
||||||
QString m_macAddress;
|
QString m_macAddress;
|
||||||
int m_bitRate;
|
int m_bitRate = 0;
|
||||||
bool m_pluggedIn;
|
bool m_pluggedIn = false;
|
||||||
|
|
||||||
void setMacAddress(const QString &macAddress);
|
void setMacAddress(const QString &macAddress);
|
||||||
void setBitRate(const int &bitRate);
|
void setBitRate(const int &bitRate);
|
||||||
|
|||||||
@ -74,7 +74,7 @@ private:
|
|||||||
QDBusInterface *m_wirelessInterface;
|
QDBusInterface *m_wirelessInterface;
|
||||||
|
|
||||||
QString m_macAddress;
|
QString m_macAddress;
|
||||||
int m_bitRate;
|
int m_bitRate = 0;
|
||||||
WirelessAccessPoint *m_activeAccessPoint;
|
WirelessAccessPoint *m_activeAccessPoint;
|
||||||
QDBusObjectPath m_activeAccessPointObjectPath;
|
QDBusObjectPath m_activeAccessPointObjectPath;
|
||||||
|
|
||||||
|
|||||||
@ -78,6 +78,7 @@ DevicePluginMock::DevicePluginMock()
|
|||||||
|
|
||||||
DevicePluginMock::~DevicePluginMock()
|
DevicePluginMock::~DevicePluginMock()
|
||||||
{
|
{
|
||||||
|
delete m_virtualFs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DevicePluginMock::discoverDevices(DeviceDiscoveryInfo *info)
|
void DevicePluginMock::discoverDevices(DeviceDiscoveryInfo *info)
|
||||||
|
|||||||
@ -86,6 +86,7 @@ private:
|
|||||||
class VirtualFsNode {
|
class VirtualFsNode {
|
||||||
public:
|
public:
|
||||||
VirtualFsNode(const BrowserItem &item):item(item) {}
|
VirtualFsNode(const BrowserItem &item):item(item) {}
|
||||||
|
~VirtualFsNode() { while (!childs.isEmpty()) delete childs.takeFirst(); }
|
||||||
BrowserItem item;
|
BrowserItem item;
|
||||||
QList<VirtualFsNode*> childs;
|
QList<VirtualFsNode*> childs;
|
||||||
void addChild(VirtualFsNode* child) {childs.append(child); }
|
void addChild(VirtualFsNode* child) {childs.append(child); }
|
||||||
|
|||||||
Reference in New Issue
Block a user