示例#1
0
        public static void TestEolianEinaValueInReturn()
        {
            var obj = new Dummy.TestObject();

            using (Eina.Value v = new Eina.Value(Eina.ValueType.Int32)) {
                v.Set(42);
                obj.SetValuePtr(v);
                Test.AssertEquals(Eina.Ownership.Managed, v.Ownership);

                Eina.Value v_received = obj.GetValuePtrOwn();
                Test.AssertEquals(Eina.Ownership.Managed, v_received.Ownership);
                Test.AssertEquals(v, v_received);
                v_received.Dispose();
            }
        }