diff --git a/src/GLKit/GLKMesh.cs b/src/GLKit/GLKMesh.cs index a31fcfa2ae57..3b38e3d81682 100644 --- a/src/GLKit/GLKMesh.cs +++ b/src/GLKit/GLKMesh.cs @@ -13,11 +13,9 @@ public partial class GLKMesh { /// To be added. /// To be added. /// To be added. - public static GLKMesh []? FromAsset (MDLAsset asset, out MDLMesh [] sourceMeshes, out NSError error) + public static GLKMesh []? FromAsset (MDLAsset asset, out MDLMesh []? sourceMeshes, out NSError? error) { - NSArray aret; - - var ret = FromAsset (asset, out aret, out error); + var ret = FromAsset (asset, out NSArray? aret, out error); sourceMeshes = NSArray.FromArray (aret); return ret; } diff --git a/src/glkit.cs b/src/glkit.cs index 368d1a624dd4..6d9f1b57d428 100644 --- a/src/glkit.cs +++ b/src/glkit.cs @@ -433,7 +433,8 @@ interface GLKMesh { [Static] [Export ("newMeshesFromAsset:sourceMeshes:error:")] [return: NullAllowed] - GLKMesh [] FromAsset (MDLAsset asset, out NSArray sourceMeshes, out NSError error); + [return: Release] + GLKMesh [] FromAsset (MDLAsset asset, [NullAllowed] out NSArray sourceMeshes, [NullAllowed] out NSError error); /// To be added. /// To be added. diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-GLKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-GLKit.ignore index a53149aeb633..205372105779 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-GLKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-GLKit.ignore @@ -51,7 +51,6 @@ !missing-pinvoke! NSStringFromGLKVector4 is not bound # Initial result from new rule missing-release-attribute-on-return-value -!missing-release-attribute-on-return-value! GLKit.GLKMesh[] GLKit.GLKMesh::FromAsset(ModelIO.MDLAsset,Foundation.NSArray&,Foundation.NSError&)'s selector's ('newMeshesFromAsset:sourceMeshes:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(Foundation.NSData,ModelIO.MDLMeshBufferType)'s selector's ('newBufferWithData:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(ModelIO.IMDLMeshBufferZone,Foundation.NSData,ModelIO.MDLMeshBufferType)'s selector's ('newBufferFromZone:data:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(ModelIO.IMDLMeshBufferZone,System.UIntPtr,ModelIO.MDLMeshBufferType)'s selector's ('newBufferFromZone:length:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-GLKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-GLKit.ignore index a53149aeb633..205372105779 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-GLKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-GLKit.ignore @@ -51,7 +51,6 @@ !missing-pinvoke! NSStringFromGLKVector4 is not bound # Initial result from new rule missing-release-attribute-on-return-value -!missing-release-attribute-on-return-value! GLKit.GLKMesh[] GLKit.GLKMesh::FromAsset(ModelIO.MDLAsset,Foundation.NSArray&,Foundation.NSError&)'s selector's ('newMeshesFromAsset:sourceMeshes:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(Foundation.NSData,ModelIO.MDLMeshBufferType)'s selector's ('newBufferWithData:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(ModelIO.IMDLMeshBufferZone,Foundation.NSData,ModelIO.MDLMeshBufferType)'s selector's ('newBufferFromZone:data:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(ModelIO.IMDLMeshBufferZone,System.UIntPtr,ModelIO.MDLMeshBufferType)'s selector's ('newBufferFromZone:length:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GLKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GLKit.ignore index a53149aeb633..205372105779 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GLKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GLKit.ignore @@ -51,7 +51,6 @@ !missing-pinvoke! NSStringFromGLKVector4 is not bound # Initial result from new rule missing-release-attribute-on-return-value -!missing-release-attribute-on-return-value! GLKit.GLKMesh[] GLKit.GLKMesh::FromAsset(ModelIO.MDLAsset,Foundation.NSArray&,Foundation.NSError&)'s selector's ('newMeshesFromAsset:sourceMeshes:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(Foundation.NSData,ModelIO.MDLMeshBufferType)'s selector's ('newBufferWithData:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(ModelIO.IMDLMeshBufferZone,Foundation.NSData,ModelIO.MDLMeshBufferType)'s selector's ('newBufferFromZone:data:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! ModelIO.IMDLMeshBuffer GLKit.GLKMeshBufferAllocator::CreateBuffer(ModelIO.IMDLMeshBufferZone,System.UIntPtr,ModelIO.MDLMeshBufferType)'s selector's ('newBufferFromZone:length:type:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required.