Out of Memory

本ブログは更新を停止しました。Aerieをよろしくお願いいたします。

目次

Blog 利用状況

ニュース

2009年3月31日
更新を停止しました。引き続きAerieを御愛顧くださいませ。
2009年2月3日
原則としてコメント受付を停止しました。コメントはAerieまでお願いいたします。
詳細は2月3日のエントリをご覧ください。
2008年7月1日
Microsoft MVP for Developer Tools - Visual C++ を再受賞しました。
2008年2月某日
MVPアワードがVisual C++に変更になりました。
2007年10月23日
blogタイトルを変更しました。
2007年7月1日
Microsoft MVP for Windows - SDKを受賞しました!
2007年6月20日
スキル「ニュース欄ハック」を覚えた!
2006年12月14日
記念すべき初エントリ
2006年12月3日
わんくま同盟に加盟しました。

カレンダー

中の人

αετο? / aetos / あえとす

シャノン? 誰それ。

顔写真

埼玉を馬鹿にする奴は俺が許さん。

基本的に知ったかぶり。興味を持った技術に手を出して、ちょっと齧りはするものの、それを応用して何か形にするまでは及ばずに飽きて放り出す人。

書庫

日記カテゴリ

RealProxy使えねぇー

今までは「プロキシヽ(゚∀゚)ノサイコー」でしたが、一転、「プロキシorzツカエネー」になりました。

まぁ何があったかと言うと、周知の問題だったわけですが、

  • this経由の参照は生のまま
  • newを捕捉できない

っていう2点が、これほど大きく効いてくるとは思わなかった。

要するにアレですもんね。プロキシを被せたいオブジェクトの実装を知らないと使えないってことですもんね。

投稿日時 : 2007年1月9日 13:22

Feedback

# re: RealProxy使えねぇー 2007/01/09 15:01 黒龍

> this経由の参照は生のまま
つDynamicProxy
ソースがあるなら設計&コーディングルールで回避するほうが早そう…。

> newを捕捉できない
つContextBoundObject

# re: RealProxy使えねぇー 2007/01/09 16:23 シャノン

DynamicProxyってCastleの?
何にせよ、標準のRealProxyは使えねー。

ContextBoundObjectは、多重継承を認めない.NETでは使いにくすぎる印象が。
ContextBoundObjectであるということ自体がAspectだというのに。

# re: RealProxy使えねぇー 2007/01/09 18:22 黒龍

> DynamicProxyってCastleの?
です。
> 何にせよ、標準のRealProxyは使えねー。

用途がみえないんで何ともですがあとからメソッドの動きをどうにかするっていう場合にはAOPは全く役に立ちませんし向きませんね。

# re: RealProxy使えねぇー 2007/01/09 18:28 シャノン

うーん?
そもそも、AOPって「後からメソッドの動きをどうにかする」ことじゃないのん?

# re: RealProxy使えねぇー 2007/01/09 21:11 黒龍

> そもそも、AOPって「後からメソッドの動きをどうにかする」ことじゃないのん?
ソースを失念したのではっきりとしたことは言えないのですがパッチ的な使い方ではなくAOPに向いた設計をすべきということが提唱されていました。
私もこの意見には賛成であくまで処理の事前、事後に処理を挟み込む or 処理をまるまるすげかえるなどの用途に使うのがいいと思います。
パッチ的な用途に用いてしまうと折角実装から分離したAspectが実装と密に結びついてしまうのでオブジェクト指向的な良さをスポイルしてしまうように思います。

# re: RealProxy使えねぇー 2007/01/09 22:48 シャノン

あぁ、なるほど。
確かに俺が「RealProxy使えねー」と判断したのは、黒龍さんの言うところのAOP的ではない処理でした。
でも、目的をそれだけに限定してもやっぱり、Weaving対象のクラスの作りによっては、RealProxyが使えない場合がありますよね。
というか、俺が投げた処理に割と近いシチュエーションで。

# re: RealProxy使えねぇー 2007/01/09 22:54 シャノン

うーむ。

> Weaving対象のクラスの作りによっては、RealProxyが使えない場合がありますよね。

だから、AOPしたいんであれば、被Weavingクラスをそういう作りにするな、っていうことかしら。
それはそれで制限になってしまうなぁ。

> というか、俺が投げた処理に割と近いシチュエーションで。

これ、そんなにひねくれた処理じゃないと思うので。

ちなみにどんなケースでさじを投げたかと言うと、例えばこう。

class A
{
 public B GetB()
 {
  retuen new B( this );
 }

 public void SomeMethod();
}

class B
{
 private A _a;
 public B( A a )
 {
  _a = a;
 }

 public Moge()
 {
  _a.SomeMethod();
 }
}

A a = GetProxiedA();
a.GetB().Moge();

これでAspect対象にならないA.SomeMethodの出来上がり。
実際に俺が遭遇したケースはもーちょっとヒネクレてるけど。

# re: RealProxy使えねぇー 2007/01/10 0:11 黒龍

ある程度の制限は仕方ないと思います。AOPすることも含めて設計&コーディングしないと^^;

まずい点がいまいち見えないですがInterfaceやVirtualを絡めてうまくいかないかな??

# re: RealProxy使えねぇー 2007/01/10 9:10 シャノン

> AOPすることも含めて設計&コーディングしないと^^;

なるほどねぇ。
その点からみると、.NET FrameworkってのはRealProxyやContextBoundObjectを提供しているにもかかわらず、AOP-Friendlyな作りになっていないと言えましょう。
.NET Frameworkに対してProxy被せようとして失敗したのでね。
他人が作った、ソースコードが手に入らないビルド済みバイナリに対してもWeavingできるってのがAOPの利点の一つだと思っていたのだけれど、無条件にYESというわけではないのかもしれないね。

ま、そもそも、RealProxyやContextBoundObjectが当初からAOPを想定して提供されていたかどうかという問題もあるけれど。「プロキシ」とか「コンテキスト」ってのはCOMの概念ですからね。

# re: RealProxy使えねぇー 2007/01/10 10:06 黒龍

> .NET Frameworkに対してProxy被せようとして失敗したのでね。
他人が作った、ソースコードが手に入らないビルド済みバイナリに対してもWeavingできるってのがAOPの利点の一つだと思っていたのだけれど、無条件にYESというわけではないのかもしれないね。
ですね。.Netの場合というかRealProxyの場合はWeavingというよりはインターセプトなので。

> ま、そもそも、RealProxyやContextBoundObjectが当初からAOPを想定して提供されていたかどうかという問題もあるけれど。「プロキシ」とか「コンテキスト」ってのはCOMの概念ですからね。
なるほど。興味深い点です。Essential .NETあたりではAOP的考えとしてRealProxyやContextBoundObjectに触れているので意識はされていたように思います。C#の父アンダースさんは動的ウィービングでのコード汚染はやなのでパーシャルを推奨していましたね。

# RealProxy使えねぇー:2 2007/01/11 16:49 .COM -どっとこむ-

RealProxy使えねぇー:2

# I visited multiple websites however the audio feature for audio songs existing at this web page is really fabulous. 2018/10/05 11:54 I visited multiple websites however the audio feat

I visited multiple websites however the audio feature for audio songs
existing at this web page is really fabulous.

# Hi there, all is going sound here and ofcourse every one is sharing information, that's in fact excellent, keep up writing. 2018/10/07 21:43 Hi there, all is going sound here and ofcourse eve

Hi there, all is going sound here and ofcourse every one is sharing information, that's in fact excellent,
keep up writing.

# Hi to all, it's really a fastidious for me to go to see this site, it includes valuable Information. 2018/10/11 21:44 Hi to all, it's really a fastidious for me to go

Hi to all, it's really a fastidious for me to go to see this site,
it includes valuable Information.

# My brother recommended I might like this website. He was once totally right. This submit actually made my day. You cann't imagine just how so much time I had spent for this information! Thanks! 2018/10/30 20:27 My brother recommended I might like this website.

My brother recommended I might like this website. He was once totally right.
This submit actually made my day. You cann't imagine just how so much time I had spent for this
information! Thanks!

# Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your website? My website is in the exact same niche as yours and my users would certainly benefit from some of the information you provide here. Please let m 2018/11/19 7:23 Do you mind if I quote a couple of your articles a

Do you mind if I quote a couple of your articles as
long as I provide credit and sources back to your website?
My website is in the exact same niche as yours and my users would
certainly benefit from some of the information you provide
here. Please let me know if this okay with you. Appreciate it!

# Heya i'm for the first time here. I found this board and I find It truly useful & it helped me out a lot. I hope to give something back and help others like you aided me. 2019/04/08 6:17 Heya i'm for the first time here. I found this boa

Heya i'm for the first time here. I found this board and I find It truly useful & it helped me out a lot.
I hope to give something back and help others
like you aided me.

# It's not my first time to pay a quick visit this web page, i am visiting this site dailly and obtain pleasant facts from here daily. 2019/05/04 16:03 It's not my first time to pay a quick visit this w

It's not my first time to pay a quick visit
this web page, i am visiting this site dailly and obtain pleasant facts from here daily.

# Ridiculous story there. What occurred after? Take care! 2019/05/06 10:06 Ridiculous story there. What occurred after? Take

Ridiculous story there. What occurred after?
Take care!

# After exploring a few of the blog posts on your web page, I seriously appreciate your way of writing a blog. I book marked it to my bookmark site list and will be checking back soon. Please check out my web site as well and tell me how you feel. 2019/06/09 17:17 After exploring a few of the blog posts on your we

After exploring a few of the blog posts on your web page, I seriously
appreciate your way of writing a blog. I book marked it to my bookmark site list and will be checking
back soon. Please check out my web site as well and tell me how you feel.

# Hello to all, because I am really eager of reading this weblog's post to be updated on a regular basis. It consists of fastidious information. 2019/09/04 22:10 Hello to all, because I am really eager of reading

Hello to all, because I am really eager of reading this weblog's post
to be updated on a regular basis. It consists of fastidious information.

# Hello to all, because I am really eager of reading this weblog's post to be updated on a regular basis. It consists of fastidious information. 2019/09/04 22:11 Hello to all, because I am really eager of reading

Hello to all, because I am really eager of reading this weblog's post
to be updated on a regular basis. It consists of fastidious information.

# Hello to all, because I am really eager of reading this weblog's post to be updated on a regular basis. It consists of fastidious information. 2019/09/04 22:12 Hello to all, because I am really eager of reading

Hello to all, because I am really eager of reading this weblog's post
to be updated on a regular basis. It consists of fastidious information.

# Hello to all, because I am really eager of reading this weblog's post to be updated on a regular basis. It consists of fastidious information. 2019/09/04 22:13 Hello to all, because I am really eager of reading

Hello to all, because I am really eager of reading this weblog's post
to be updated on a regular basis. It consists of fastidious information.

# It's awesome to visit this web page and reading the views of all mates concerning this post, while I am also zealous of getting experience. 2021/08/23 18:10 It's awesome to visit this web page and reading th

It's awesome to visit this web page and reading the
views of all mates concerning this post, while I am also zealous of getting
experience.

# It's awesome to visit this web page and reading the views of all mates concerning this post, while I am also zealous of getting experience. 2021/08/23 18:11 It's awesome to visit this web page and reading th

It's awesome to visit this web page and reading the
views of all mates concerning this post, while I am also zealous of getting
experience.

# It's awesome to visit this web page and reading the views of all mates concerning this post, while I am also zealous of getting experience. 2021/08/23 18:12 It's awesome to visit this web page and reading th

It's awesome to visit this web page and reading the
views of all mates concerning this post, while I am also zealous of getting
experience.

# It's awesome to visit this web page and reading the views of all mates concerning this post, while I am also zealous of getting experience. 2021/08/23 18:13 It's awesome to visit this web page and reading th

It's awesome to visit this web page and reading the
views of all mates concerning this post, while I am also zealous of getting
experience.

# When someone writes an article he/she retains the thought of a user in his/her mind that how a user can be aware of it. Therefore that's why this post is outstdanding. Thanks! 2021/08/26 12:18 When someone writes an article he/she retains the

When someone writes an article he/she retains the thought of
a user in his/her mind that how a user can be aware of it.
Therefore that's why this post is outstdanding. Thanks!

# When someone writes an article he/she retains the thought of a user in his/her mind that how a user can be aware of it. Therefore that's why this post is outstdanding. Thanks! 2021/08/26 12:19 When someone writes an article he/she retains the

When someone writes an article he/she retains the thought of
a user in his/her mind that how a user can be aware of it.
Therefore that's why this post is outstdanding. Thanks!

# Hi, i feel that i saw you visited my web site thus i got here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!! 2021/09/02 21:08 Hi, i feel that i saw you visited my web site thus

Hi, i feel that i saw you visited my web site thus i got
here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!!

# Hi, i feel that i saw you visited my web site thus i got here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!! 2021/09/02 21:09 Hi, i feel that i saw you visited my web site thus

Hi, i feel that i saw you visited my web site thus i got
here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!!

# Hi, i feel that i saw you visited my web site thus i got here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!! 2021/09/02 21:10 Hi, i feel that i saw you visited my web site thus

Hi, i feel that i saw you visited my web site thus i got
here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!!

# Hi, i feel that i saw you visited my web site thus i got here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!! 2021/09/02 21:11 Hi, i feel that i saw you visited my web site thus

Hi, i feel that i saw you visited my web site thus i got
here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!!

# Hello, just wanted to tell you, I liked this post. It was funny. Keep on posting! 2021/09/04 18:03 Hello, just wanted to tell you, I liked this post.

Hello, just wanted to tell you, I liked this post.

It was funny. Keep on posting!

# Hello, just wanted to tell you, I liked this post. It was funny. Keep on posting! 2021/09/04 18:05 Hello, just wanted to tell you, I liked this post.

Hello, just wanted to tell you, I liked this post.

It was funny. Keep on posting!

# Hello, just wanted to tell you, I liked this post. It was funny. Keep on posting! 2021/09/04 18:06 Hello, just wanted to tell you, I liked this post.

Hello, just wanted to tell you, I liked this post.

It was funny. Keep on posting!

# Hello, just wanted to tell you, I liked this post. It was funny. Keep on posting! 2021/09/04 18:07 Hello, just wanted to tell you, I liked this post.

Hello, just wanted to tell you, I liked this post.

It was funny. Keep on posting!

# This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery 2021/09/14 13:59 This info is invaluable. When can I find out more?

This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

# This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery 2021/09/14 14:00 This info is invaluable. When can I find out more?

This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

# This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery 2021/09/14 14:01 This info is invaluable. When can I find out more?

This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

# This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery 2021/09/14 14:02 This info is invaluable. When can I find out more?

This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery

# I go to see day-to-day a few web sites and information sites to read content, but this web site provides quality based content. 2021/12/16 5:22 I go to see day-to-day a few web sites and informa

I go to see day-to-day a few web sites and information sites to read content, but this web site provides quality
based content.

# I go to see day-to-day a few web sites and information sites to read content, but this web site provides quality based content. 2021/12/16 5:23 I go to see day-to-day a few web sites and informa

I go to see day-to-day a few web sites and information sites to read content, but this web site provides quality
based content.

# I go to see day-to-day a few web sites and information sites to read content, but this web site provides quality based content. 2021/12/16 5:24 I go to see day-to-day a few web sites and informa

I go to see day-to-day a few web sites and information sites to read content, but this web site provides quality
based content.

タイトル
名前
Url
コメント