RAII lease wrapper for pooled StringBuilder buffers with automatic resource management.
More...
RAII lease wrapper for pooled StringBuilder buffers with automatic resource management.
Provides exclusive access to a pooled DynamicStringBuffer through RAII semantics. Automatically returns the buffer to the pool when the lease is destroyed, ensuring optimal memory reuse and preventing resource leaks. Features move-only semantics for safe transfer of ownership and convenient access methods.
- Note
- This class implements move-only semantics - copying is disabled to prevent multiple ownership of the same buffer. Use std::move() for ownership transfer.
- Warning
- Not thread-safe - external synchronization required for concurrent access. Do not share lease instances between threads without proper synchronization.
- See also
- StringBuilderPool::lease() for obtaining lease instances
-
StringBuilder for the high-level string building interface
-
DynamicStringBuffer for the underlying buffer implementation
Definition at line 695 of file StringBuilderPool.h.