signal slots (new, fixed version)

Walter Bright newshound at digitalmars.com
Wed Nov 1 15:09:03 PST 2006


J Duncan wrote:
> You are the man! I have been experimenting with hooking into object 
> destruction by replacing the dtor pointer in the classinfo.

I looked into that, too, and decided that it was never going to work. 
Everything I thought of just cost too much memory and runtime for all 
objects, not just hooked ones.

> I came 
> across the monitor reference today in the ABI docs and have been looking 
> into it - wondering what you are up to. This is Very Cool! Thanks!

I had a flash of inspiration one day that I was trying to hook in the 
wrong place. Since the monitor is an opaque type, that could be hooked 
with only a bit of casting, and it wouldn't affect anything else. Best 
of all, it only costs if it is used, not for the usual case. The 
monitors even still work with hooked objects.

I didn't like having to tinker around under the hood like that, but it 
was in a good cause.



More information about the Digitalmars-d-announce mailing list