Ok, more on the arena leakage we were discussing last night; there are two main causes that I can see right now:
1. NRArenaItems still increment their children's refcount, even though they are now managed by the garbage collector.
The resulting belt-and-suspenders situation keeps both the child and its parent from ever being collected.
The fix: remove internal refcounting from arenaitems (non-gced objects still need to refcount them, of course)
2. NRObjects (like NRArenaItems) often allocate memory from the libc heap, which the collector cannot free automatically.
There is an existing finalization callback for NRObjects that was used for freeing such memory, but it was no longer getting called.
The fix: hook that now-unused finalization callback to the garbage collector's finalization callback.
Once I get those straightened out we'll see if there's anything else left.
-mental
participants (1)
-
MenTaLguY