2013-05-02 86 views

回答

14

Rails是一個框架,而不是語言。 Rails背後的語言被稱爲Ruby。

這意味着Rails中沒有Garbage Collector的概念。您應該搜索關於Ruby垃圾收集器的文檔。

您可以從Ruby GC module開始。 GC模塊爲Ruby的標記和清理垃圾收集機制提供了一個接口。

根據Ruby語言版本,垃圾收集器可能會有不同的行爲。文章How Ruby Manages Memory and Garbage Collection描述了Ruby 1.9垃圾收集器。在Ruby 2.0 the GC has been improved and the implementation changed a bit

+0

謝謝@Simone Carletti.thats my answer .. – Milind 2013-05-29 10:26:50