I run exactly the same test and code on 2 different Windows OS, and the same host ON to be scanned by nmap.
I setup this library to capture all packets like a full sniffer, and run this nmap command: nmap -sV --version-intensity 2 192.168.0-1.1-254
In the OS 64 bits version, all runs fine. My ram ussage goes up to 500mb and stay like that until all the nmap run.

In the OS 32 bits version, the ram consumption goes up indefinetly, and never goes down using the garbage collector.

All the RAM is consummed by this classes (on the 64 bits version, all looks fine):

64 bit ram ussage: https://www.dropbox.com/s/ooysoa0vrl038gj/Captura%20de%20pantalla%202017-10-13%2016.59.18.png?dl=0
32 bit ram ussage: https://www.dropbox.com/s/rnzo00j6jg6bb7y/Captura%20de%20pantalla%202017-10-13%2021.00.13.png?dl=0
Objects filling up the ram: https://www.dropbox.com/s/rtg5npebq1naoin/Captura%20de%20pantalla%202017-10-13%2021.00.24.png?dl=0