is there a way to tell GC how big is the referenced object?
sidorares opened this issue · 0 comments
sidorares commented
Something like AdjustAmountOfExternalAllocatedMemory()
?
I'm using weak to automatically free X11 objects (tracking pairs of XCreatePixmap / XFreePixmap, for example - https://github.com/sidorares/ntk/blob/a3321273985c1d8df8d95b7e27b968c127377416/lib/pixmap.js#L24-L29 ) but because local object is basically an int, it takes a lot of time until it's GCed - id like to be able to make a hint that this objects references relatively heavy thing