System Namespace |
These types are not replacements for the official System.Memory types — they exist solely to preserve binary and source compatibility of JCOBridge public APIs on .NET Framework targets. On .NET 5+ and .NET Standard 2.1 the official runtime types are used instead and these shims are not present in the assembly.
| Structure | Description | |
|---|---|---|
| PinnedMemoryHandle | Handle returned by Pin. Dispose to release the pin. | |
| ReadOnlyMemoryT |
Compatibility shim of ReadOnlyMemoryT for .NET Framework targets.
Unlike the official type it can be backed either by a managed array or by a native pointer. A managed array is never exposed through a raw pointer unless pinned: use TryGetArray(ArraySegmentT) or Pin. Span is available only for native-backed instances. | |
| ReadOnlySpanT |
Compatibility shim of ReadOnlySpanT for .NET Framework targets.
This type is provided solely to allow JCOBridge public APIs that expose ReadOnlySpanT (such as AsSpan and AsSpan) to compile and function correctly on .NET Framework without any external dependency. The span can be backed by a managed array (the reference is tracked by the GC, so the array can be moved safely) or by native memory (the caller guarantees that the memory stays valid and fixed for the lifetime of the span). A raw pointer is never stored for a managed array: it is pinned only for the duration of each operation that needs it. JCOBridge HPA edition on .NET Framework uses the official System.ReadOnlySpan<T> from the System.Memory NuGet package, which provides the full runtime-optimised implementation including SIMD support. Users targeting .NET 5+ or .NET Standard 2.1 always receive the official runtime type — this shim is never compiled into those targets. | |
| ReadOnlySpanTEnumerator | Enumerator for ReadOnlySpanT, returned by GetEnumerator. | |
| SpanT |
Compatibility shim of SpanT for .NET Framework targets.
This type is provided solely to allow JCOBridge public APIs that expose SpanT (such as AsWritableSpan and AsWritableSpan) to compile and function correctly on .NET Framework without any external dependency. The span can be backed by a managed array (the reference is tracked by the GC, so the array can be moved safely) or by native memory (the caller guarantees that the memory stays valid and fixed for the lifetime of the span). A raw pointer is never stored for a managed array: it is pinned only for the duration of each operation that needs it. JCOBridge HPA edition on .NET Framework uses the official System.Span<T> from the System.Memory NuGet package, which provides the full runtime-optimised implementation including SIMD support. Users targeting .NET 5+ or .NET Standard 2.1 always receive the official runtime type — this shim is never compiled into those targets. | |
| SpanTEnumerator | Enumerator for SpanT, returned by GetEnumerator. |