.NET 有软引用吗?
可能的重复:
为什么 .NET 不这样做有一个 SoftReference 和 WeakReference,就像 Java 一样?
Java 有多种类型的引用,其中两种是 弱 和 软。我知道 .NET 有弱引用,但它有软引用吗也?
(软引用比弱引用更强,因为即使不存在强引用,它们也会尝试使对象保持活动状态。但是,当内存紧张时,它们会释放。)
Possible Duplicate:
Why doesn't .NET have a SoftReference as well as a WeakReference, like Java?
Java has several types of references, two of these are Weak and Soft. I know that .NET has Weak references but does it have Soft ones too?
(Soft references are stronger than Weak ones in that they will try to keep an object alive even when no strong references exist. They do release however when memory is tight.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,事实并非如此。
No, it doesn't.