3 ms·
In the sample on that page, it says: // Prevent objects from being GC'd global.app = app; global.window = window; Why do you need to do that? I thoug
by firefoxman1 15y ago
In the sample on that page, it says:
// Prevent objects from being GC'd
global.app = app;
global.window = window;
Why do you need to do that? I thought that as long as there were still references to an object, it isn't GC'd.
- arturadib 15y agoYeah it's just in case there are no surviving references to those vars. For example in the hello world code app gets GC'd unless it's in a callback in setTimeout().