[#39106] What processor do you run ruby on? — "K.Sasada" <ko1@...>

 ささだです。

13 messages 2004/02/09
[#39200] Re: What processor do you run ruby on? — "K.Sasada" <ko1@...> 2004/02/17

"K.Sasada" <ko1@namikilab.tuat.ac.jp> wrote :

[#39207] Re: What processor do you run ruby on? — Isamu KOZUKA <kozuka@...> 2004/02/17

小塚@しなきゃならないテストがいっぱいだ〜....です。

[#39129] InternetExplorer ってインターフェースとして使える? — Shin-ichiro HARA <sinara@...>

原です。

34 messages 2004/02/10
[#39130] Re: InternetExplorer ってインターフェースとして使える? — Yac <yac@...> 2004/02/10

岡です。

[#39136] Re: InternetExplorer ってインターフェースとして使える? — Yac <yac@...> 2004/02/10

岡です。

[#39140] Re: InternetExplorer ってインターフェースとして使える? — arton <artonx@...> 2004/02/11

artonです。別件。

[#39144] Re: InternetExplorer ってインターフェースとして使える? — Shin-ichiro HARA <sinara@...> 2004/02/12

原です。

[#39145] Re: InternetExplorer ってインターフェースとして使える? — arton <artonx@...> 2004/02/12

artonです。

[#39146] Re: InternetExplorer ってインターフェースとして使える? — nobu.nakada@... 2004/02/12

なかだです。

[#39147] Re: InternetExplorer ってインターフェースとして使える? — arton <artonx@...> 2004/02/12

artonです。

[#39150] Re: InternetExplorer ってインターフェースとして使える? — nobu.nakada@... 2004/02/12

なかだです。

[#39151] Re: InternetExplorer ってインターフェースとして使える? — arton <artonx@...> 2004/02/12

artonです。

[#39275] DnD on win32 — Shinichiro HIDA <shinichiro@...>

飛田と申します。

21 messages 2004/02/26
[#39276] Re: DnD on win32 — たむらけんいち <sgs02516@...> 2004/02/26

たむらです。

[#39277] Re: DnD on win32 — Shinichiro HIDA <shinichiro@...> 2004/02/27

飛田です。

[#39278] Re: DnD on win32 — Itou-T15@... 2004/02/27

[#39288] 固有値、固有ベクトルの計算 — Masahiro Sato <msato@...>

19 messages 2004/02/27

[ruby-list:39155] Re: InternetExplorerってインターフェースとして使える?

From: arton <artonx@...>
Date: 2004-02-12 12:42:09 UTC
List: ruby-list #39155
artonです。

> グローバルな Hash を一つ用意して、そこに入れておくのはどうでしょうか。
> それで、その Hash を rb_gc_register_address する。
> 意味的にもパフォーマンス的にもよい結果になると思います。
それは、HashにCOMのインスタンスをキーとして内包しているインスタンスを値
として持ち、COMのインスタンスの廃棄時にHashから棄てるという動作になるの
かな?
Init_win32ole
$com_hash = Hash.new()

Dispatchラッパ
def initialize(val)
  @obj = val
  $com_hash[self] = val
end
def release
 $com_hash.delete(self)
end
という感じですね。実際には
static VALUE com_hash;
...
com_hash = rb_hash_new();
rb_gc_register_address(com_hash);
と無名で良いので、それが良さそうな気がします。

-- 
arton <artonx@yahoo.co.jp>

__________________________________________________
Do You Yahoo!?
http://bb.yahoo.co.jp/


In This Thread