ephemeron

An ephemeron is a data structure that solves two related problems in garbage collected systems. On the one hand, an ephemeron provides a notification when some object is about to be collected. On the other hand, an ephemeron allows data to be associated with some object without creating a reference to that object that will prevent the object from being collected. An ephemeron is a key-value pair, where the key is the object that the ephemeron guards, notifying the system when that object is collectable, and the value can be any data associated with the object such as a property list, and which may be empty. Since the elements of the property list may refer back to the key, they may prevent collection of that key. But the ephemeron is treated specially by the garbage collector. The value field is not traced until the key is found to be reachable from the system roots other than through ephemeron keys. The set of ephemerons whose keys are only reachable from ephemeron keys are then holding onto keys that are ready to be collected; these objects are not reachable from the roots except through ephemerons. When the garbage collector detects such a set, the ephemerons are queued for notification and their keys and values are traced. Hence ephemerons both detect objects that are ready for collection and break the cycles that can prevent objects from being collected.

A Rumour of Foxes - 2025-07-08T00:00:00.000000Z

Little Goldfish - 2025-02-18T00:00:00.000000Z

Uruwashi - 2025-01-28T00:00:00.000000Z

Orpheus - 2024-04-01T00:00:00.000000Z

Funatabi - 2024-01-05T00:00:00.000000Z

Utsuroi - 2023-12-14T00:00:00.000000Z

Similar Artists

猫田ねたこ

曽我部瑚夏

イシイモモコ

に角すい

大山りょうとぎがもえか

heimrecord

田上碧

tamamix

朝/宵

たやももか

BROCANTE

日髙 晴野

Rie Mitsutake

白線に枇杷

heprcam

Thousands Birdies' Legs

Kiwokuza

ホノベミナミ

Quinka,with a Yawm

三枝伸太郎