Files
MapLibreParticleLab/binding.gyp
John Firebaugh c4c3a19d85 [node] Allow GC in spite of reference loops through the request method
The following produces a reference cycle:

var map = new mbgl.Map({
    request: function () { ... }
});

map has a reference to the request function, which has a reference to
its closure, which has a reference to map.

Storing a the map options in an internal field, rather than a Persistent,
allows V8 to collect the reference cycle when none of its members have
other references.
2015-11-20 16:33:46 -08:00

42 lines
1.0 KiB
Python

{
'includes': [
'gyp/common.gypi',
],
'targets': [
{ 'target_name': '<(module_name)',
'dependencies': [
'gyp/mbgl.gyp:core',
'gyp/mbgl.gyp:platform-<(platform_lib)',
'gyp/mbgl.gyp:headless-<(headless_lib)',
],
'include_dirs': [
'<(node_root_dir)/include/node',
"<!(node -e \"require('nan')\")",
],
'sources': [
'platform/node/src/node_mapbox_gl_native.cpp',
'platform/node/src/node_log.hpp',
'platform/node/src/node_log.cpp',
'platform/node/src/node_map.hpp',
'platform/node/src/node_map.cpp',
'platform/node/src/node_request.hpp',
'platform/node/src/node_request.cpp',
'platform/node/src/util/async_queue.hpp',
],
},
{ 'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
'destination': '<(module_path)'
}
]
}
]
}