Dustin,

> Adding what amounts to a use-after-free bug to the protocol seems like a
really bad idea to me.

Oh goody, a sarcastic comment which doesn't actually bother to explain the
bug :)

Since what I describe is basically WeakReferenceable, it's not obvious to
me that there's a bug. I tell you when the thing to which your
Remote(Weak)Reference points is destroyed, just like weak references invoke
finalization callbacks. If you try to invoke remote methods after than
happens I just return you an error. What's the problem? This is exactly how
weak references work.

> If your server-side app is sensitive to when objects are destroyed for
any reason aside
> from management of its memory consumption, I'd argue your app is broken.

That's a really good point. Only CPython destroys objects deterministically
when the ref count hits zero.

> Certainly it opens you to a denial of service from a malicious client,
which might hold references
> to objects you'd rather it didn't

So my instinct to keep strong references only where they're needed is just
bad? Should a GUI or a logger keep a strong reference to the things they
observe?

Daniel
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to