Questions tagged «memory-optimization»

9
减少.NET应用程序的内存使用量?
有什么技巧可以减少.NET应用程序的内存使用?考虑下面的简单C#程序。 class Program { static void Main(string[] args) { Console.ReadLine(); } } 在x64的发布模式下编译并在Visual Studio外部运行,任务管理器报告以下内容: Working Set: 9364k Private Working Set: 2500k Commit Size: 17480k 如果仅针对x86进行编译会更好一些: Working Set: 5888k Private Working Set: 1280k Commit Size: 7012k 然后,我尝试了以下程序,该程序执行相同的操作,但尝试在运行时初始化后减小进程大小: class Program { static void Main(string[] args) { minimizeMemory(); Console.ReadLine(); } private static void …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.