Development0 views

Microsoft Plans Memory Safety Upgrades for C# 15

Microsoft is narrowing the safety gap between C# and Rust by introducing new memory management features without sacrificing its signature garbage collection. According to Richard Lander, .NET Product Manager, the upcoming C# 15 and .NET 11 will integrate mechanisms to prevent common memory errors while maintaining the ease of an automated environment.

Rather than a complete rewrite of the language, the goal is to provide developers with specific safety guarantees similar to Rust's ownership model, but adapted for the .NET ecosystem. Key highlights include:

  • Introduction of enhanced memory safety protocols to reduce vulnerabilities.
  • Maintenance of automatic memory management to keep the language accessible.
  • A public preview scheduled for release with .NET 11.

These changes reflect a broader industry push for secure-by-design software, aiming to eliminate entire classes of bugs that have historically plagued systems programming.