Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve UnmanagedArray<T> obsolescence warnings #2180

Open
VaclavElias opened this issue Mar 10, 2024 · 0 comments
Open

Resolve UnmanagedArray<T> obsolescence warnings #2180

VaclavElias opened this issue Mar 10, 2024 · 0 comments

Comments

@VaclavElias
Copy link
Contributor

While generating documentation using docfx, I encountered 14 warnings related to the use of UnmanagedArray<T>, which has been marked as obsolete. The recommended approach is to obtain Memory<T> using GC.Allocate*Array or through a Stride-specific allocator mechanism. Addressing these warnings will enhance our codebase's cleanliness and maintainability. Below are examples of the warnings:

1. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Audio\CompressedSoundSource.cs(20,24): warning CS0618: 'UnmanagedArray<short>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
2. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\IHeightStickArraySource.cs(26,24): warning CS0618: 'UnmanagedArray<T>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
3. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\HeightStickArraySourceFromHeightmap.cs(34,31): warning CS0618: 'UnmanagedArray<T>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
4. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\ByteHeightStickArraySource.cs(45,31): warning CS0618: 'UnmanagedArray<T>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
5. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\Shapes\HeightfieldColliderShape.cs(129,16): warning CS0618: 'UnmanagedArray<short>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
6. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\Shapes\HeightfieldColliderShape.cs(131,16): warning CS0618: 'UnmanagedArray<byte>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
7. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\Shapes\HeightfieldColliderShape.cs(133,16): warning CS0618: 'UnmanagedArray<float>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
8. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\ShortHeightStickArraySource.cs(45,31): warning CS0618: 'UnmanagedArray<T>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
9. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\Shapes\HeightfieldColliderShape.cs(42,86): warning CS0618: 'UnmanagedArray<short>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
10. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\Shapes\HeightfieldColliderShape.cs(47,86): warning CS0618: 'UnmanagedArray<byte>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
11. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\Shapes\HeightfieldColliderShape.cs(52,86): warning CS0618: 'UnmanagedArray<float>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
12. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\FloatHeightStickArraySource.cs(35,31): warning CS0618: 'UnmanagedArray<T>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
13. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\Data\HeightfieldColliderShapeDesc.cs(81,24): warning CS0618: 'UnmanagedArray<T>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
14. warning: D:\Projects\GitHub\stride\sources\engine\Stride.Physics\UnmanagedArrayExtensions.cs(18,41): warning CS0618: 'UnmanagedArray<T>' is obsolete: 'Obtain Memory<T> using GC.Allocate*Array or a Stride-specific allocator mechanism.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant