Java Code Examples for android.database.sqlite.SQLiteDatabase.releaseMemory()

The following are Jave code examples for showing how to use releaseMemory() of the android.database.sqlite.SQLiteDatabase class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: LaunchEnr   File: Launcher.java   View Source Code Vote up 5 votes
@Override
public void onTrimMemory(int level) {
    super.onTrimMemory(level);
    if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {
        // The widget preview db can result in holding onto over
        // 3MB of memory for caching which isn't necessary.
        SQLiteDatabase.releaseMemory();

        // This clears all widget bitmaps from the widget tray
        // TODO(hyunyoungs)
    }
    if (mLauncherCallbacks != null) {
        mLauncherCallbacks.onTrimMemory(level);
    }
}
 
Example 2
Project: FlickLauncher   File: Launcher.java   View Source Code Vote up 5 votes
@Override
public void onTrimMemory(int level) {
    super.onTrimMemory(level);
    if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {
        // The widget preview db can result in holding onto over
        // 3MB of memory for caching which isn't necessary.
        SQLiteDatabase.releaseMemory();

        // This clears all widget bitmaps from the widget tray
        // TODO(hyunyoungs)
    }
    if (mLauncherCallbacks != null) {
        mLauncherCallbacks.onTrimMemory(level);
    }
}
 
Example 3
Project: SimpleUILauncher   File: Launcher.java   View Source Code Vote up 5 votes
@Override
public void onTrimMemory(int level) {
    super.onTrimMemory(level);
    if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {
        // The widget preview db can result in holding onto over
        // 3MB of memory for caching which isn't necessary.
        SQLiteDatabase.releaseMemory();

        // This clears all widget bitmaps from the widget tray
        // TODO(hyunyoungs)
    }
    if (mLauncherCallbacks != null) {
        mLauncherCallbacks.onTrimMemory(level);
    }
}
 
Example 4
Project: Android-Copy-Database   File: DBHelper.java   View Source Code Vote up 4 votes
public synchronized void close(){
    if(mDataBase != null)
        mDataBase.close();
    SQLiteDatabase.releaseMemory();
    super.close();
}