Skip to content

Add unmanaged generic support to ReadMemory/WriteMemory#185

Open
zhengmouren233 wants to merge 4 commits intoerfg12:masterfrom
zhengmouren233:master
Open

Add unmanaged generic support to ReadMemory/WriteMemory#185
zhengmouren233 wants to merge 4 commits intoerfg12:masterfrom
zhengmouren233:master

Conversation

@zhengmouren233
Copy link
Copy Markdown

@zhengmouren233 zhengmouren233 commented Mar 30, 2026

Summary

Added generic type support for memory read/write operations using unsafe and unmanaged constraints.

Technical Details

  • Uses typeof()/sizeof(T) for fast size calculation
  • Requires C# 7.3+ for where T : unmanaged constraint

Scope

  • Modified: ReadMemory<T>(), WriteMemory<T>()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant