Skip to content

Instantly share code, notes, and snippets.

@rolftimmermans
Last active September 2, 2017 09:37
Show Gist options
  • Save rolftimmermans/91066783f44951fc1e1a70ed38a670fe to your computer and use it in GitHub Desktop.
Save rolftimmermans/91066783f44951fc1e1a70ed38a670fe to your computer and use it in GitHub Desktop.
const zmq = require("./lib")
const client = zmq.socket("dealer")
client.connect("tcp://127.0.0.1:3456")
gc()
console.log(process.memoryUsage())
for (let i = 0; i < 500; i++) {
const buf = Buffer.alloc(1024 * 1024)
client.send(buf)
}
gc()
console.log(process.memoryUsage())
client.linger = 0
client.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment