SaltwaterC/aws2js — Issue #9: Memory leak when retrieving cloudwatch stats
Author: jadell
Created: 2011-12-22 22:26:59+00:00
State: open

The following code snippet seems to consume memory and never release it, until the OS kills the process.

```javascript
var aws = require("aws2js");
var cw = aws.load('cloudwatch', 'KEY', 'SECRET');
setInterval(function () {
cw.request("GetMetricStatistics", {
"Namespace" : 'name/space',
"StartTime" : '2011-12-21T17:20:00.906Z',
"EndTime" : '2011-12-22T17:20:00.906Z',
"Period" : 60,
"Unit" : "Count",
"Statistics.member.1" : 'Sum',
"MetricName" : 'foo',
"Dimensions.member.1.Name" : 'foo',
"Dimensions.member.1.Value" : 'foo'
}, function(error, result) {
console.log(result);
console.log(process.memoryUsage());
})}, 1000);

```

Node version 0.6.6
├─┬ aws2js@0.6.0
│ ├── libxml-to-js@0.3.9
│ └── mime-magic@0.2.3
├── libxmljs@0.4.3
└── underscore@1.2.3