01-17-2013 10:57 AM
Is an ANE run exclusively in each applications own context (user space) or are only some parts? What I'm wondering is if the ExtensionInitializer is run only once or does it run every time an application uses the ANE. Some functions can only be called once in the BPS library so I was placing the code there and want to make sure each call is made in the applications user space and not a global user space for the extension if this function will be called more than once.
Solved! Go to Solution.
01-17-2013 12:15 PM
The initializer is called when you callExtensionContext.createExtensionContext() from ActionScript. You normally do this in your .SWC.
The finalizer will be called whenever your extension goes out of scope (e.g. the reference to it is nulled, or your app is closed).
01-17-2013 12:26 PM
01-17-2013 12:39 PM
01-17-2013 12:46 PM - edited 01-17-2013 12:50 PM
Well I just made a quick test application to check on this and ExtensionInitializer is only run once, but ContextInitializer is run each time createExtensionContext is called.
So it sems the ContextInitializer is only used if you want different functions available for different context/uses of your ANE but global data is shared between all of your contexts, which I can see being useful but can be a pitfall if you're not aware of this.