Toot

Written by Jan Ekholm on 2024-10-18 at 08:20

TIL that std::shared_ptr has a custom "deleter" function you can set for actually deleting the memory. Seems to make for a pretty nice way to create a memory buffer manager. I need to shuffle a lot of smallish buffers and allocating/freeing memory all the time is not particularly efficient, especially not when time is essential. I guess this is nothing new to the veterans out there, but it'll make my life easier.

[#]cpp #std #shared_ptr

=> More informations about this toot | View the thread | More toots from chakie@toot.community

Mentions

Tags

=> View cpp tag | View std tag | View shared_ptr tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113327448951018999
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
223.668212 milliseconds
Gemini-to-HTML Time
0.534299 milliseconds

This content has been proxied by September (ba2dc).