Groups | Blog | Home
all groups > inetserver asp general > november 2003 >

inetserver asp general : Can I safely call Response.End in a server-side JScript constructor?


Vince C.
11/28/2003 5:25:43 PM
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.

lukezhan NO[at]SPAM online.microsoft.com
12/1/2003 3:42:08 AM
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.)
Vince C.
12/3/2003 11:12:51 PM
"MSFT" <lukezhan@online.microsoft.com> a écrit dans le message de
news:XdL4e07tDHA.1268@cpmsftngxa06.phx.gbl...
[quoted text, click to view]

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

Vince C.

AddThis Social Bookmark Button