トップページ > プログラム > 2015年05月23日 > YAXRIJCD

書き込み順位&時間帯一覧

20 位/176 ID中時間01234567891011121314151617181920212223Total
書き込み数0000010000001000001000003



使用した名前一覧書き込んだスレッド一覧
545
デフォルトの名無しさん
C#, C♯, C#相談室 Part87 [転載禁止]©2ch.net
Win32API質問箱 Build120©2ch.net

書き込みレス一覧

C#, C♯, C#相談室 Part87 [転載禁止]©2ch.net
622 :545[sage]:2015/05/23(土) 05:57:30.49 ID:YAXRIJCD
デリゲートもGCHandleも関数ポインタも全部フィールドに持っておくことにしました。
C#, C♯, C#相談室 Part87 [転載禁止]©2ch.net
631 :545[sage]:2015/05/23(土) 12:05:39.60 ID:YAXRIJCD
下の方の

Fortunately, in this case, you don't need to allocate
a pinned GC handle, because the thunk is allocated
in the unmanaged heap and is referencing the delegate
indirectly through a reference known to the GC. Therefore,
it is not possible for the thunk to move around, and
native code should always be able to call the delegate
through the unmanaged pointer if the delegate itself is alive.

で決まりですね
納得できました。。

>545の最初の質問がアホであることが判明しましたね
関数ポインタはデリゲートのインスタンスごとにサンクとして作られるわけで、
クラスメソッドごとにあるわけじゃないってとこを勘違いしてました
Win32API質問箱 Build120©2ch.net
398 :デフォルトの名無しさん[sage]:2015/05/23(土) 18:38:18.33 ID:YAXRIJCD
お前が淘汰されないユルい世界に感謝しな


※このページは、『2ちゃんねる』の書き込みを基に自動生成したものです。オリジナルはリンク先の2ちゃんねるの書き込みです。
※このサイトでオリジナルの書き込みについては対応できません。
※何か問題のある場合はメールをしてください。対応します。