Why is it not very reliable for rust to pass data on the heap through the Box method?
I want to pass struct data to my own dll. To ensure that data is not dropped, I use Box
to move the struct to the heap, and get the pointer by Box::into_raw
. Unfortunately sometimes I encounter some ERROR when I printing the data from my dll. This is very weird because ERROR occur randomly.