English 中文(简体)
为什么有人推翻了OfMemoryException?
原标题:Why does the OutOfMemoryException get thrown?

原因何在。 该网络的运行时间是向外围延伸。 垃圾收集器的工作是在分配物体之前视需要清理记忆和免费记忆;为什么似乎不记忆?

最佳回答
问题回答

垃圾收集器的工作比在您的物品之后we忙得多。 还必须了解你如何分配记忆,确保你申请的所有不同部分(思考多胎线等)都能获得足够规模的丘克。

垃圾收集员还必须负责可靠地清扫记忆,以不会严重影响业绩的方式这样做,并确保在你试图决定哪些记忆可以收回和哪些东西时,不会将更多的“问题”引入你的法典。

其一大工作,不易或直截了当。

就你的具体观点而言,OMOM可以出于各种原因发生,但是,由于记忆要求比GC能够合理地调整现有记忆以达到这一目的,因此,通常会发生这种情况,而GC无法充分纠正过于分散的地库,使之无法消除。 在此情况下,理事会被迫报告申请,而OMS则不得不报告申请,以防出现更多的积压申请,并确保它永远不会赶上。

If you use more memory than you have and don t free it... you ll end up out of memory. GC cleans only stuff that you do not reference anymore.





相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签