You know there is a SDK runtime function for global data?
Printable View
You know there is a SDK runtime function for global data?
no, what is it? (in standard MMF SDK)... i was using rSDK but I think I'll be able to find it there...
mvSetExtUserData
Yes, if you have a variable that is global to the application, you should store it with mvSetExtUserData and retrieve it with mvGetExtUserData.
Because if you use a global variable in the global heap of the extension, you have to know that :
- it will be shared by all the sub-applications too.
- if your extension is played in a Vitalize! 4 application, then the variable will be shared by all the CCN applications played in the same instance of the browser (as V4 is executed in multi-thread mode).
I want it to be shared by all subapplications...
Another question - If I use the global variable (and NOT using the mvGetExtUserData), will it be shared with the same extension in another instance of the same application?
For my game I will not allow another instance, but I just wanted to know if it is shared even across applications.
No, the global variable won't be shared with other stand-alone applications.