Issue 96:
GPSEE can incorrectly GC script modules
It is trivial to create modules with internal state.
Script modules can be garbage collected when they are unreferenced by the calling environment. They will be transparently reloaded on next use. However, this can create a visible error condition.
This problem does not affect native-language module which correctly implement the *_FiniModule() interface, as this interface tells the garbage collector that we have internal state.
Work around: Create a GC root in script for any modules which hide internal state, e.g.
const msgex = require("msgex");
Suggested Fix: We need to turn this functionality off by default for script modules, and only enable it for modules that explicitly notify GPSEE that they can be garbage collected. Suggested interface: 'module.pure = true' (purity concept borrowed from gcc function attributes)
http://code.google.com/p/gpsee/issues/detail?id=96Wes
--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102