Can I safely call Response.End in a server-side JScript constructor?

V

Vince C.

Hi.

I've got the following ASP server-side script:

function MyObject()
{
if ( myCondition == true ) {
Response.End();
}
...
}

Will it result in resource leakage or will the being-constructed instance be
released properly?

Thanks in advance,
Vince C.
 
M

MSFT

Hi Vince,

"Response.End" will send all currently buffered output to the client, stops
execution of the page. If there some code which take resposiblility to
release resource after "Response.End", these code may not be executed.
Therefore, we need to use this carefully, to ensure resource leak.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
V

Vince C.

MSFT said:
Hi Vince,

"Response.End" will send all currently buffered output to the client, stops
execution of the page. If there some code which take resposiblility to
release resource after "Response.End", these code may not be executed.
Therefore, we need to use this carefully, to ensure resource leak.

Thanks, Luke. So the response is "no". I'll take it into account.

Vince C.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top