9
votes
Vote UpVote

Using anonymous methods in method pointers

Entropy Overload – Anonymous methods may have associated state. In particular, all variables that an anonymous method captures need to be kept alive so long as the anonymous method is callable. For this reason, anonymous methods are implemented with a lifetime management approach: anonymous methods are actually methods on an object which implements COM-style reference counted interfaces. Method references are interface references with a single method called Invoke. If one badly wants to store an anonymous method in a method pointer, this information can be used to shoehorn it in. Here's how it can be done: ...
Favorite? Off-Topic? Barry Kelly @ 2010-01-20 19:31

Statistics

Visits: 557
Votes: 9
Favorites: 3
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

_Serg_
jamiei
JC Chu
knight_killer
Mohammed Nasman
PhiS>
Robert Love
StigP
Tier777
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)