MantisBT - Zandronum
View Issue Details
0003018Zandronum[All Projects] Bugpublic2017-02-19 01:032019-06-04 21:54
Dusk 
Dusk 
normalmajorhave not tried
newopen 
2.1 
 
0003018: Master server leaks memory
NETBUFFER_s does not destroy its buffer when deleted, but relies on its Free method being called. Master server's BanlistPacketSender does not do this. As a result, 1KiB of memory is leaked every time the master server sends the banlist to a server. Since there's hundreds of servers, this must tally up to hundreds of kilobytes lost quickly enough.

Note: I don't know how to actually test it. But this seems like a glaring problem and I can't see how this cannot be happening.

The master server as is locks up mysteriously and needs to be restarted all the time. Maybe this is why?

I noticed this by doing some refactor on the network classes and decided to make NETBUFFER_s have a destructor. I noticed that this makes every single Free() calls unnecessary and allows removal of a lot of code.
No tags attached.
Issue History
2017-02-19 01:03DuskNew Issue
2017-02-19 01:03DuskStatusnew => assigned
2017-02-19 01:03DuskAssigned To => Dusk
2017-02-19 01:07DuskNote Added: 0016877
2019-06-04 21:54DuskStatusassigned => new

Notes
(0016877)
Dusk   
2017-02-19 01:07   
Argh! NETBUFFER_s can have a stack buffer too. So it cannot have a destructor since it's not encapsulated enough.