List Info

Thread: Any drawbacks to leaving a webservice "defined"




Any drawbacks to leaving a webservice "defined"
user name
2006-03-17 14:42:06
I have an application that will make lots and lots of calls
to the same
webservice on a form. These calls could be over multiple
hours (each
call is seconds in length). I had been declaring the
webservice instance
each time and the disposing of it when done.. I was thinking
about
making it a private form level variable and then just using
that through
the life of the form. Are there any real drawbacks to this?

 

Stacey

 


===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Any drawbacks to leaving a webservice "defined"
user name
2006-03-17 15:23:34
A WebService is derived from MarshalByValueComponent.
It dispose implementation is not doing anything interesting
other than
removing itself from its container (in your case probably
the form).
WebService itself has not overridden the dispose
functionality, so you
may safely keep the instance alive along with your form.

HTH
// Ryan


On 3/17/06, Stacey Levine <staceylmusicforasong.com>
wrote:
> I have an application that will make lots and lots of
calls to the same
> webservice on a form. These calls could be over
multiple hours (each
> call is seconds in length). I had been declaring the
webservice instance
> each time and the disposing of it when done.. I was
thinking about
> making it a private form level variable and then just
using that through
> the life of the form. Are there any real drawbacks to
this?
>
>
>
> Stacey
>
>
>
>
> ===================================
> This list is hosted by DevelopMentor(r)  http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com

>

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )