Exemplo n.º 1
0
                public static void FreeManagedPtr_inner(System.IntPtr ptr)
                {
                    Complex_Struct obj = (Complex_Struct)Marshal.PtrToStructure(ptr, typeof(Complex_Struct
                                                                                            ));

                    if (obj._owner != 0x972f3813)
                    {
                        throw new System.InvalidOperationException();
                    }
                    Array_Foo_Helper.FreeManagedPtr(obj.foo);
                    XobotOS.Runtime.MarshalGlue.String_Helper.FreeManagedPtr(obj.str);
                }
Exemplo n.º 2
0
 internal static void bar(martin.Test.Foo[] arg)
 {
     System.IntPtr arg_ptr = System.IntPtr.Zero;
     try
     {
         arg_ptr = Array_Foo_Helper.ManagedToNative(arg);
         libxobotos_Test_bar(arg_ptr);
     }
     finally
     {
         Array_Foo_Helper.FreeManagedPtr(arg_ptr);
     }
 }