How to change a Heroku nodejs worker to avoid memory leaks?

Here's a node js worker on Heroku:

var Worker = require('./worker.js')
...
Worker.performJob(data) //data is a small object with just 3 attributes

worker.js:

var Worker = {}
Worker.performJob = function (data) {
  //read lots of data into memory, call other functions with this data as parameters
  var hugeData = readFromDb()
  Worker.processStuff(hugeData)
}

Worker.processStuff = function (hugeData) {
  ...
}

module.exports = Worker

The worker listens to some events and starts processing data, over and over again. In time, the memory used by the worker grows -- it's not deallocated when performJob() finishes, even though all huge variables are local. This article http://www.smashingmagazine.com/2012/11/05/writing-fast-memory-efficient-javascript/ hints that it might be because of the Worker global variable, at it keeps references to functions.

How should the worker be written to avoid this?

UPDATE I've changed the worker by moving functions in the same .js file. Now it reads

performJob(data)

function performJob(data) {
  //read lots of data into memory, call other functions with this data as parameters
  var hugeData = readFromDb()
  processStuff(hugeData)
}

function processStuff(hugeData) {
  ...
}

Still, the memory grows after each task performed, and remains to that level when idle (as shown by https://devcenter.heroku.com/articles/log-runtime-metrics), then grows again after another task...