< :the previous in number
^ :the list in numerical order
> :the next in number
P :the previous (in thread)
N :the next (in thread)
|<:the top of this thread
>|:the next thread
^ :the parent (reply-to)
_:the child (an article replying to this)
>:the elder article having the same parent
<:the youger article having the same parent
---:split window and show thread lists
| :split window (vertically) and show thread lists
~ :close the thread frame
.:the index
..:the index of indices
Florian,
If there is no use count, how does Ruby know that there are no
references to the object that should be freed?
Ralph
Monday, November 9, 2009, 3:02:37 PM, you wrote:
FF> Ralph Shnelvar wrote:
>> Marnen,
>>
>> Unless "scope" means something different in Ruby than it does in other
>> languages, it would appear that the garbage collector cannot possibly
>> free memory when something goes out of scope but, instead, when the
>> UseCount goes to zero.
>>
FF> Except that uses aren't counted in Ruby. Ruby has a mark-and-sweep
FF> garbage collector. When Ruby runs out of memory a garbage collection run
FF> is triggered. If there aren't any references to the objects in question
FF> left, they aren't reachable from the root set and thus not marked in the
FF> first phase of GC, in the second phase they will then (too be
FF> conservative: most likely) be freed.
--
Best regards,
Ralph mailto:ralphs / dos32.com