ecere/com: Fixed module initialization
authorJerome St-Louis <jerome@ecere.com>
Sun, 25 Nov 2012 05:50:38 +0000 (00:50 -0500)
committerJerome St-Louis <jerome@ecere.com>
Sun, 25 Nov 2012 05:50:38 +0000 (00:50 -0500)
- Put global variable re-initializations between #ifdef __ANDROID__,
 as modules loaded by the IDE are meant to use the same application context.
 This reinitialization code had been added since libraries do not get unloaded on Android.
 (Will need to find a better solution to run the IDE *on* Android)

ecere/src/com/instance.ec

index 816a683..a51b3e2 100644 (file)
@@ -5995,6 +5995,7 @@ public dllexport Application __ecere_COM_Initialize(bool guiApp, int argc, char
 {
    Application app;
 
+#ifdef __ANDROID__
    // Clean up global variables
    memoryInitialized = false;
    pools = null;
@@ -6009,6 +6010,7 @@ public dllexport Application __ecere_COM_Initialize(bool guiApp, int argc, char
    TOTAL_MEM = 0;
    OUTSIDE_MEM = 0;
 #endif
+#endif
 
 #ifdef _DEBUG
    // printf("Using debug ecere runtime library\n");