/* The managed call must not take ownership of the returned string */ public static void return_string() { { var obj = new Dummy.TestObject(); Test.AssertEquals("string", obj.ReturnString()); } System.GC.Collect(); }