るりまサーチ

最速Rubyリファレンスマニュアル検索!
89件ヒット [1-89件を表示] (0.021秒)
トップページ > クエリ:ref[x] > クエリ:weakref[x] > クエリ:WeakRef[x]

別のキーワード

  1. weakref weakref_alive?
  2. weakref new
  3. weakref __getobj__
  4. weakref __setobj__
  5. weakref weakref

ライブラリ

クラス

キーワード

検索結果

WeakRef#weakref_alive? -> bool (59302.0)

参照先のオブジェクトがまだ生きていれば真を返します。 GC されていれば偽を返します。

参照先のオブジェクトがまだ生きていれば真を返します。
GC されていれば偽を返します。

WeakRef (58060.0)

weak reference を実現するクラスです。

...weak reference を実現するクラスです。

WeakRef
オブジェクトは与えられたオブジェクトをポイントしますが、
ポイント先のオブジェクトは GC される可能性があります。
アクセスしようとしたときにオブジェクトが GC されてい...
...れば
WeakRef
::RefError が発生します。

delegate も参照してください。

=== サンプルコード

require 'weakref'

foo = Object.new
ref
= WeakRef.new(foo)
ref
.some_method_of_foo...

weakref (50000.0)

weak reference を実現します。

...weak reference を実現します。...

WeakRef.new(orig) -> WeakRef (41302.0)

与えられたオブジェクトを使って自身を初期化します。

与えられたオブジェクトを使って自身を初期化します。

@param orig 任意のオブジェクトを指定します。

WeakRef#__getobj__ -> object (41012.0)

自身の参照先のオブジェクトを返します。

...自身の参照先のオブジェクトを返します。

@raise WeakRef::RefError GC 済みのオブジェクトを参照した場合に発生します。

@see delegate...

絞り込み条件を変える

WeakRef#__setobj__(obj) -> () (41000.0)

与えられたオブジェクトを自身の参照先としてセットします。 内部用のメソッドなので使わないでください。

与えられたオブジェクトを自身の参照先としてセットします。
内部用のメソッドなので使わないでください。

@param obj 任意のオブジェクトを指定します。

WeakRef::RefError (23000.0)

GC されたオブジェクトを参照しようとしたときに発生する例外です。

GC されたオブジェクトを参照しようとしたときに発生する例外です。

NEWS for Ruby 3.0.0 (30.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis] foundation is
in...
...lv
* rinda
* set
* securerandom
* shellwords
* tempfile
* tmpdir
* time
* tsort
* un
* weakref
* The following extensions are promoted to default gems from stdlib.
* digest
* io-nonblock
* io-wait
* nkf
* p...
...and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature is designed by referring to Python's buffer protocol. 13767 14722
* Ractor related C APIs are introduced (experimental) in "include/ruby/ractor.h".

== Implementati...