[Mono-dev] [PATCH] Refactoring of WebClient

Miguel de Icaza miguel at novell.com
Tue Dec 18 12:44:02 EST 2007


Hello,

> I did a refactoring for the WebClient class for compatibility purpose
> (The type IntPtr is not supported in JAVA PROFILE).
> 
> Please review and approve.

This patch does not seem to touch on anything related to IntPtr, it
seems to depend on the compiler capturing variables (userToken for
example) and referencing variables instead of using the extra argument
to the thread to do so.

I had a mental note that we probably need to Clone the data (or at least
things like Uris) in WebClient because the async versions of these
methods just keep a reference to it, and the parent might modify the Uri
while the other thread is running.

So basically, I think that depending on captured variables here will
just exacerbate the problem (using references to objects that we really
should not be referencing) and yet, this is not an issue about IntPtr.

Please explain.

Miguel.
> 



More information about the Mono-devel-list mailing list