Let’s say we have such code as below
'Call service
Set xmlhttp_ = CreateObject("MSXML2.xmlhttp")
xmlhttp_.Open "GET", url, False
xmlhttp_.send
result = (xmlhttp_.responseText)
sendRequest = result
Do we need to dispose xmlhttp_ after used?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It should be automatically disposed as soon as it goes out of scope. See Matthew Curland’s response here:
https://groups.google.com/forum/?hl=en&fromgroups#!topic/microsoft.public.dotnet.languages.vb/3pw-TGc9PSo