How to get reference count for an object   Is it possible to determine if a javascript object has multiple references to it?  Or if it has references besides the one I'm accessing it with?  Or even just to get the reference count itself? Can I fi...
In Electron, I have my main process opening a BrowserWindow. The BrowserWindow loads one html page and then the same window eventually loads another html page.  main.js  var mainWindow; global.mainState = {   settings: {} } mainWindow = createWindow(...
I want to trigger JavaScript garbage collection. Is it possible? Why would I want to, or not want to, do this?...
I want to cache large objects in JS. These objects are retrieved by key, and it makes sense to cache them. But they won't fit in memory all at once, so I want them to be garbage collected if needed - the GC obviously knows better.  It is pretty t...
Following the first comment on this question:  What makes this function run much slower?  Does the garbage collector sweep stack memory? From what I've read, usually gc's don't do this. Following this question, I imagine that there is no...
Let's say I have a long running loop:  // Let's say this loop takes 10 seconds to execute for(let i = 0; i <= 1000000; ++i) {     const garbage = { i };     // some other code }   Can the garbage collector run during the loop, or it can on...
If I have something like this:  class MyComponent {    constructor() {      this.interval = Observbale.interval(1000);    } }  const c = new MyComponent(); const subscription = c.interval.subscribe(() => { ... })   Now let's say that at a cert...
I read the documentation on KineticJS Docs and it says that:  destroy() - remove and destroy self  remove() - remove self from parent, but don't destroy  If what I understand is correct, the remove() function removes the node from the parent but...
Do not fear! This is not production code. It is just to learn new things about QML!  I do not seek 'you shall not do something like this - do it like that.'  I am more interested in the internals of QML   Consider the following QML-Code  i...
A javascript WeakMap ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap ) does not allow you to get the key, or the length or size, by design.  Is it possible to nevertheless loop over entries in some way ?  If...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.