Can Re-creation of variables lead to Performance Issues (memory leak)

 
Hi all,
You know you can define global or local variables and then you can change a global variable or you can re-create a local variable like this

Global
double MyVar;
if (Condition)
{
MyVar=5;
}


Local
if (Condition)
{
double MyVar=5;
}

Which one is the right approach, performance-wise,

considering recreation of the var may cause RAM leak.

 
MEHMET FATIH BARUT: considering recreation of the var may cause RAM leak.

Only allocating objects with new can result in a memory leak.

 
that means in my case (creating var without new) there is no problem?