ASP.NET doesn't have Object Pooling in standard like in Java EE?

。_饼干妹妹 提交于 2019-12-23 18:42:10

问题


I read this C# Object Pooling Pattern implementation so my question: does one have to implement own Object Pooling strategy in ASP.NET whereas this exists in Java EE?

Well I'm upset as I prefer .net platform to java, but here in java it's done without being a guru. I'm surprised ASP.NET didn't implement at least the same and even better.


回答1:


Recently I've learned that .NET covers this for atleast some scenarios.

BufferManager Class

Is an object pool for buffers. I don't see any readily available way to extend this for other purposes short of decompiliation & reverse engineering. However it's possible that a more usable class exists somewhere deep in .NET.

Also in regards to C# Object Pooling Pattern implementation the complexity involved in this will reduce substantially with .NET 4.0 having been released. The majority (or all) of the locking code could completely be swept away and replaced with the Concurrent data classes.



来源:https://stackoverflow.com/questions/5799950/asp-net-doesnt-have-object-pooling-in-standard-like-in-java-ee

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!