# Variables inside functions in memory

**URL:** https://forum.kirupa.com/t/variables-inside-functions-in-memory/320307
**Category:** Uncategorized
**Created:** [March 20, 2011, 12:30am UTC](https://forum.kirupa.com/t/variables-inside-functions-in-memory/320307 "2011-03-20T00:30:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![orgio](https://avatars.discourse-cdn.com/v4/letter/o/74df32/32.png) [@orgio](https://forum.kirupa.com/u/orgio)
#### Post date: [March 20, 2011, 12:30am UTC](https://forum.kirupa.com/t/variables-inside-functions-in-memory/320307/1 "2011-03-20T00:30:18Z")

</div>

hi there, i would appreciate a clarification. let’s say i have a function  
\*\*  
function myFuction():void  
{  
var myArr:Array = new Array();  
…  
}\*\*

lets say that this array -during the first call of the function- gets filled with some data.  
Next time i will call the function, all these data will be entirely lost or they will go somewhere in the memory occupying space?

thanks in advance
