I was wondering about how passing a String or a StringBuilder to a C function which output a string by parameter. I ve found a great answer in
Calling unmanaged function from C#: should I pass StringBuilder or use unsafe code?
But I have a doubt. Anyone can explain to me why the garbage collector doesn t relocate the (managed) StringBuilder instance during imported function execution?