# Garbage Collection and External Function Calls

**URL:** <https://forum.kirupa.com/t/garbage-collection-and-external-function-calls/303603>\
**Category:** flash\
**Created:** [January 23, 2010, 2:26am UTC](https://forum.kirupa.com/t/garbage-collection-and-external-function-calls/303603 "2010-01-23T02:26:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [January 23, 2010, 2:26am UTC](https://forum.kirupa.com/t/garbage-collection-and-external-function-calls/303603/1 "2010-01-23T02:26:37Z")

</div>

I have a UI that is importing external SWFs. The external SWFs call functions in the main class like this:

```auto

import actionscript.Interface;

var directionsArr:Array = new Array();
directionsArr[0] = "Click the <b>Forward</b> arrow to continue.";

if (Interface._ui != null) {
    Interface._ui.setDirections(directionsArr[0]);
    Interface._ui.setBackNext(0,1); // Navigation buttons in UI
    Interface._ui.completePage(); // Shared Object is updated
}

```

How is garbage collection effected by this code? And is it creating a strong reference that is never garbage collected?
