# Garbage collection

**URL:** <https://www.ruby-forum.com/t/garbage-collection/53494>\
**Category:** Ruby\
**Created:** [February 7, 2006, 5:39pm UTC](https://www.ruby-forum.com/t/garbage-collection/53494 "2006-02-07T17:39:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@tma](https://www.ruby-forum.com/u/tma)\
**Post date:** [February 7, 2006, 5:39pm UTC](https://www.ruby-forum.com/t/garbage-collection/53494/1 "2006-02-07T17:39:17Z")

</div>

I haven’t a copy of the code yet but a friend of mine was bemoaning his  
efforts to create an application in ruby (conversion from python) and  
ran into a problem.

He discards a LOT of objects during the final steps of his application  
run. This part of the process ultimately results in a crash every time  
he runs it.

Is there something that can be recommended to help with garbage  
collection?

---

<div class="post-metadata">

**Author:** ![tma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@tma](https://www.ruby-forum.com/u/tma)\
**Post date:** [February 7, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/garbage-collection/53494/2 "2006-02-07T18:10:12Z")

</div>

Tom A. wrote:

> I haven’t a copy of the code yet but a friend of mine was bemoaning  
> his efforts to create an application in ruby (conversion from python)  
> and ran into a problem.
> 
> He discards a LOT of objects during the final steps of his application  
> run. This part of the process ultimately results in a crash every  
> time he runs it.

What exactly do you mean by “discard”? Does he simply stop referencing  
a  
big collection? Are there finalizers defined for objects?

> Is there something that can be recommended to help with garbage  
> collection?

Do not switch it off.

Seriously, your description is a bit vague, so it’s difficult to tell  
what  
the cause of his problem is (might not be GC at all).

Kind regards

```
robert
```

---

<div class="post-metadata">

**Author:** ![tma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@tma](https://www.ruby-forum.com/u/tma)\
**Post date:** [February 7, 2006, 6:28pm UTC](https://www.ruby-forum.com/t/garbage-collection/53494/3 "2006-02-07T18:28:50Z")

</div>

On 2/7/2006, “Robert K.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> big collection? Are there finalizers defined for objects?  
> I don’t think he has anything like a defined finalizer.  
> I’ll have to get the code…
