develooper Front page | perl.perl6.language.objects | Postings from December 2000

Re: RFC from a newbie: Method References

Thread Previous | Thread Next
Jeremy Howard
December 18, 2000 17:50
Re: RFC from a newbie: Method References
Message ID:
Michael G Schwern wrote:
> Hmmm... an object which contains a method reference which contains a
> referent to itself.
Yup. I don't know why some people think that circular references are complex
> > Something like this would be nice in a class that creates method
> > references--it would simply need to keep a list of referred objects, and
> > have an explicit destructor that iterates through the references and
> > them. Of course, calling the destructor would be optional where no
> > reference exists.
> Yes, you could keep a list/hash of what you created (as weak
> references) and explicitly destroy them.... but I don't think that
> would help.  Consider the following...
> <following deleted...>
> Which doesn't solve the problem... and I don't have any better ideas.
No, neither do I. So far I've been undef'ing method references semi-manually
(since there are specific event callback hooks in any widget, I just need to
undef these), but this isn't Lazy.

Maybe a flash of inspiration will come over Christmas...

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About