comparing impersonation code

Oct 17 2006 4:40 AM

Hi,

Code1 ---> c# web application

class class1
{
Impersonation;
//code here
undo Impersonation;
class 2
{
Impersonation;
//code here
undo Impersonation;      
}

}
Code2  ---> c# web application

class class1
{
Impersonation;
//code here
class 2
{
//code here
}

//undo Impersonation;      

}
Code 1 and code 2 working properly. the only issue I found in code 1 is very slow during exection.
My question in code 2 is it ok , not to undo the impersonation? Is there no problem in memory? If I uncomment the undo impersonation in code 2. there is an error occor. It say it cannot complete the operation.

Pls give me an input.

thanks,