-
-
Save pepoviola/d650bffd2fd016030b7d to your computer and use it in GitHub Desktop.
test case for issue #1333
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var browserify = require('browserify'); | |
var async = require('async'); | |
var heapdump = require('heapdump'); | |
var memwatch = require('memwatch'); | |
// memwatch.on('stats', function(stats) { console.log( stats.usage_trend ) }); | |
// memwatch.on('leak', function(info) { console.log( info ) }); | |
var paths = [ | |
'./views/demo1/demo1.js', | |
'./views/demo2/demo2.js' | |
]; | |
var i = 1; | |
var flag = false; | |
async.eachSeries( paths, function( p, cb ) { | |
if( flag ) global.gc(); | |
var b = browserify( { entries : p } ); | |
b.bundle( function( err, buf ) { | |
console.log( buf.toString() ); | |
console.log( "\n"); | |
delete( buf ); | |
delete(b); | |
// DEBUG | |
heapdump.writeSnapshot('./' + Date.now() + '.b'+i+'.heapsnapshot'); | |
i++; | |
flag = true; | |
return cb(); | |
} ); | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function baseModule(){ | |
return { a: 1}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i = 1; | |
var base1 = require( '../base' ); | |
var _ = require( 'underscore' ); | |
var nunjucks = require( 'nunjucks' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i = 2; | |
var base2 = require( '../base' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment