mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-21 11:56:23 +02:00
unique_ptr, not shared_ptr. Nothing ever shares it: naett holds a raw pointer and takes no part in the counting, and the abandonment path hands the sink over and lets go in the same breath. What's really going on is a single owner that moves, which is what unique_ptr says and shared_ptr left you to work out from reading all the uses. naett never frees the pointer it's given for the writer - it only reads bodyWriterData and hands it back to the callback - so deleting the sink is ours to do. The things naett does allocate, the request and response, stay raw pointers with explicit naettFree/naettClose. The length field was just buffer.size() written down twice.