JRuby 冻结对象与垃圾收集器
JRuby 中的冻结对象可能是内存泄漏的原因吗?或者垃圾收集器会销毁冻结的物体吗?
我的问题是,我有一个应用程序,其中运行着一些冻结的哈希值,但我还没有找出它们来自哪里,我真的很想知道冻结的对象是否会抛出 ActionView::Template::Error (GC 开销)超出限制)或 OutOfMemory Java 错误或至少导致此类错误。
谢谢。
Could frozen objects in JRuby be the reason for a memory leak? Or does the Garbage Collector destroy frozen objects ?
My problem is that I have an app which has some frozen hashes running around and I did not find out just yet where they are coming from and I would really like to know if frozen objects could throw ActionView::Template::Error (GC overhead limit exceeded) or OutOfMemory Java error or at least contribute to such an error.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不。 Object#freeze 所做的只是调用 org::jruby:: RubyObject::freeze 然后调用org::jruby::RubyObject::setFrozen 设置 IRubyObject 的属性。
这里的任何内容都不会对 GC 产生任何影响。
No. All Object#freeze does is call org::jruby::RubyObject::freeze which then calls org::jruby::RubyObject::setFrozen which sets a property on the IRubyObject.
Nothing here would have any effect on GC.