Nov. 24, 2018
8:15 p.m.
Armin Rigo schrieb am 23.11.18 um 14:15:
In PyPy we'd have a global table of "open objects", and a handle would be an index in that table; closing a handle means writing NULL into that table entry. No emulated reference counting needed: we simply use the existing GC to keep alive objects that are referenced from one or more table entries. The cost is limited to a single indirection.
Couldn't this also be achieved via reference counting? Count only in C space, and delete the "open object" when the refcount goes to 0? Stefan