Thanks for making this. I successfully integrated it into my server such that I can produce heap profiles on demand. However, I noticed the following issues:
I had to use a #[doc(hidden)] function
And I had to call std::mem::forget too to avoid a double-drop (your tests used ManuallyDrop)
It produces unwanted stderr output
This PR addresses these issues, at the cost of making the API a bit more confusing (you can set an output path and then have it be ignored when you finish into a String).
Thanks for making this. I successfully integrated it into my server such that I can produce heap profiles on demand. However, I noticed the following issues:
#[doc(hidden)]
functionstd::mem::forget
too to avoid a double-drop (your tests usedManuallyDrop
)This PR addresses these issues, at the cost of making the API a bit more confusing (you can set an output path and then have it be ignored when you finish into a
String
).