# \[Q\] Object reference / memory and performance?

**URL:** https://forum.kirupa.com/t/q-object-reference-memory-and-performance/232510
**Category:** flash
**Created:** [July 14, 2007, 8:58pm UTC](https://forum.kirupa.com/t/q-object-reference-memory-and-performance/232510 "2007-07-14T20:58:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Jolle\_no](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@Jolle\_no](https://forum.kirupa.com/u/Jolle_no)
#### Post date: [July 14, 2007, 8:58pm UTC](https://forum.kirupa.com/t/q-object-reference-memory-and-performance/232510/1 "2007-07-14T20:58:10Z")

</div>

Hi

I’m just wondering if creating (unnessesary) objectreferences take alot of memory or affects performance?

ie:  
if I have a _graphicManager_ class and a _dataManager_ class  
Lets say I have a function in _graphicManager_ that creates a movieClip, and calls it from the _dataManager_:

[COLOR=“RoyalBlue”]myGraphicManager.createMC();[/COLOR]

Sometimes I like to call it like this:

[COLOR=“RoyalBlue”]someVar = myGraphicManager.createMC();[/COLOR]

to keep a refrence in my _dataManger_ for more readable code and easy access. I’ll then have a reference in the _graphicManager_ and the _dataManager_. Is this bad? Cause I can always just keep it in the _graphicManager_ and refrence it with

[COLOR=“RoyalBlue”]myGraphicsManager.someVarMC;[/COLOR]  
(instead of useing “someVar”)

Any views on this?
