mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 17:26:24 +00:00

Many test modules load assert but do not use it. This change removes those instances. It also removes a handful of other unused variables when they were nearby. PR-URL: https://github.com/nodejs/node/pull/4438 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
23 lines
370 B
JavaScript
23 lines
370 B
JavaScript
'use strict';
|
|
// Flags: --expose-gc
|
|
|
|
require('../../common');
|
|
var binding = require('./build/Release/binding');
|
|
|
|
function check(size) {
|
|
var buf = binding.alloc(size);
|
|
var slice = buf.slice(size >>> 1);
|
|
|
|
buf = null;
|
|
binding.check(slice);
|
|
slice = null;
|
|
gc();
|
|
gc();
|
|
gc();
|
|
}
|
|
|
|
check(64);
|
|
|
|
// Empty ArrayBuffer does not allocate data, worth checking
|
|
check(0);
|