help regarding webresponse.

  • Thread starter Thread starter trialproduct2004
  • Start date Start date
T

trialproduct2004

Hi all.
i am having problem at a time of validatiang url.
I am using webrequest and webresponse class to get content of
particular url.
My problem is after using webrequest and webresponse class i want to
remove memory allocated by this object. am using close method and after
that i am setting it to null.
My pronlem is that at a time of setting webrequest to null sometimes it
is taking more than 10 minutes.
similary at a time of closing webresponse object it is taking large
amount of time.
This problem is not coming continouously.

This problem is coming especially when i am continuously running my
application for 2 to 3 days.

Can some one tell me why this is happening.
any help will be appreciated.
thanks in advance.
 
I don't understand what the issue here is really. WebResponse
implements IDisposable and as long as you call Dispose (which should be the
same as calling Close), you don't have anything to worry about. The garbage
collector will take care of the object on the heap when it determines it
needs to be.

Hope this helps.
 
Hi
thanks for your reply.
But i am facing problem at a time of closing webresponse by using
webresponse.close.
My program is blocking at this statement.
Can u tell me why this is happening.
thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top