1.0.4 • Published 9 years ago

finalize v1.0.4

Weekly downloads
4
License
BSD-2-Clause
Repository
github
Last release
9 years ago

finalize

Node module to register a garbage collector callback for objects

Usage

var finalize = require('finalize');

var obj = { x: 1337 };
finalize(obj, function () {
  console.log(this.x); // this will print '1337'
});
global.gc();
// nothing will happen, var obj above holds obj alive
obj = null;
global.gc();
// the previous line should trigger the callback above
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago