mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Attempt to fix some minor memory leaks
This commit is contained in:
parent
94f1ab4da3
commit
c0530921ff
2 changed files with 13 additions and 2 deletions
|
@ -537,6 +537,14 @@ Connection::Connection(u32 protocol_id, u32 max_packet_size, float timeout,
|
|||
Connection::~Connection()
|
||||
{
|
||||
stop();
|
||||
// Delete peers
|
||||
for(core::map<u16, Peer*>::Iterator
|
||||
j = m_peers.getIterator();
|
||||
j.atEnd() == false; j++)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
delete peer;
|
||||
}
|
||||
}
|
||||
|
||||
/* Internal stuff */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue