# Instantiation

**URL:** <https://forum.kirupa.com/t/instantiation/173746>\
**Category:** flash\
**Created:** [December 29, 2005, 5:44am UTC](https://forum.kirupa.com/t/instantiation/173746 "2005-12-29T05:44:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kernel\_flash](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@kernel\_flash](https://forum.kirupa.com/u/kernel_flash)\
**Post date:** [December 29, 2005, 5:44am UTC](https://forum.kirupa.com/t/instantiation/173746/1 "2005-12-29T05:44:10Z")

</div>

Hi all geeks,  
one fundamental question of class instantiation.

Say if I have class a as follows  
[AS]  
class a  
{  
public var prop1;  
function func1():void  
{  
}  
}  
[/AS]

now when i instantiate this class by  
var myClassA=new a();  
var myClassB=new a();  
does the memory load the function func1 also in the memory for each new instantiation or it maintains only one copy of that function in the memory.

in C++ and Java, only single copy of the method is maintained in the memory. so on call to that method by any of the object of class a only one copy of that method will be called. Each object won’t carry it’s own copy of function.

How is it in ActionScript?:hair:
