Reference counting and disposables

stemann
Mon, 15 May 2023 11:43:12 +0000
General Usage

In ResourcePools.jl/pooled_abstract_array.jl at feature/multi-threading · IHPSystems/ResourcePools.jl · GitHub, I have two concepts - in addition to pooled resources / pools of resources:

Reference counted instances - that can be retain!'ed and release!'ed - and where something should happen when the reference count reaches zero. Thread-safe.

Disposables - instances that react to dispose!, e.g., by cleaning up memory allocated outside Julia.

I have yet to find these quite common concepts in Base. Are they there somewhere or should they be split out into separate tiny packages?

5 posts - 1 participant