evgenyigumnov / cblt

Safe and fast minimalistic web server, written in Rust, that serves files from a directory and proxies requests to another server.
MIT License
39 stars 7 forks source link

Improve src/buffer_pool.rs (Memory leak problem) #6

Closed evgenyigumnov closed 1 week ago

evgenyigumnov commented 1 week ago

if "buffer_size" for "buffer: SmartVector" in function "return_buffer" more than placed in "new" than drop buffer and create new with expected capacity.

"get_buffer" should return "SmartVector" not Option. If pull is empty. Just create new instance of SmartVector