Registry / utility / refpool

refpool

JSON →
library0.4.3rscratesunverified

Efficient memory pool with reference counting.

# Cargo.toml [dependencies] refpool = "0.4.3"
INSTALL
IMPORT
SIG · REFPOOL
R
refpool
utilityrustv0.4.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pool
use refpool::Pool;

Create a memory pool and reuse allocated objects.

use refpool::Pool; fn main() { let pool: Pool<Vec<u8>> = Pool::new(|| Vec::with_capacity(1024)); let mut item = pool.get().unwrap(); item.push(42); pool.put(item); }
Debug
Known issues
gotchaItems must be returned to the pool to avoid memory leaks.
fix
Always call pool.put() after use, or use the PoolRef wrapper.
affects: all
Upgrade
Version history
0.4.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
refpool — cargo add refpool · libregistry