tags:

views:

18

answers:

1

Should I bother with disposing (using close() and abort() on exception) the WCF proxy generated using ClientBase when I am using WebHttpBinding? Since its POX/ REST over http, I am wondering if there is any harm in leaving the proxy alone after the service call!?

A: 

Technically if it's not a sessionful binding (which webHttpBinding is not), it's less important, but you'd potentially be wasting resources if you were creating clients in a tight loop (eg, faster than the GC got around to cleaning them up and releasing the connections). HTTP connections are pooled and shared by the ConnectionPointManager though, so you'd probably be OK on that front.

Still, it's not a great idea to rely on those implementation details, because if something changes down the road, you'll wonder why your client performance starts to suck. I'd clean up...

nitzmahone