Project

General

Profile

Actions

Bug #6664

closed

Object finalizer do not run until program exit

Added by funny_falcon (Yura Sokolov) over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
ruby -v:
ruby 2.0.0dev (2012-06-28 trunk 36243) [x86_64-linux]
Backport:
[ruby-core:45936]

Description

Test script: https://gist.github.com/3009867

Conclusions:

  • Ruby 1.8.7 (REE) is able to run finalizer on GC when its proc is created outside of scope and so that does not handle object in its binding.
  • even Ruby 1.8.7 not able to run finalizer until program exit when finalizer's proc is created in scope where #define_finalizer is called
  • neither Ruby 1.9.2, nor Ruby 1.9.3, nor Ruby-trunk is able to run finalizer until program exit.

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Status changed from Open to Rejected
  • Priority changed from 6 to 3

=begin
No.
(1) an object may not be collected even if it seems not referred from reading the code.
(2) finalizers may not run just after the object is collected.
=end

Actions

Also available in: Atom PDF

Like0
Like0