An open API service indexing awesome lists of open source software.

https://github.com/no-defun-allowed/the_cooler_shared_ptr

Coalesced reference counting smart pointer
https://github.com/no-defun-allowed/the_cooler_shared_ptr

garbage-collector reference-counting smart-pointer

Last synced: 2 months ago
JSON representation

Coalesced reference counting smart pointer

Awesome Lists containing this project

README

        

# The Cooler `shared_ptr`

`crc::cooler_shared_ptr` provides a [coalescing](https://sites.cs.ucsb.edu/~ckrintz/racelab/gc/papers/levanoni-on-the-fly-rc.pdf)
reference-counting smart pointer, which trades off immediate destruction for
fewer refcount updates. You may also call `crc::collect()` to cause collection to
run immediately.

This isn't thread-safe at all. I'm not entirely convinced it works with
one thread, even. But RAII does suffice to provide a shadow stack of sorts.