本文整理汇总了Java中android.media.effect.Effect.release方法的典型用法代码示例。如果您正苦于以下问题:Java Effect.release方法的具体用法?Java Effect.release怎么用?Java Effect.release使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.media.effect.Effect
的用法示例。
在下文中一共展示了Effect.release方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: releaseContext
import android.media.effect.Effect; //导入方法依赖的package包/类
/**
* Filter context should be released before the current GL context is lost.
*/
public static void releaseContext() {
if (context != null) {
// Release all effects created with the releasing context.
for (Effect effect : effects.values()) {
effect.release();
}
effects.clear();
context.release();
context = null;
}
}
示例2: release
import android.media.effect.Effect; //导入方法依赖的package包/类
/**
* Method that that release the cached data
*/
public void release() {
for (Effect effect : mCachedEffects.values()) {
try {
effect.release();
} catch (NoSuchElementException ex) {
// Catching a runtime exception is not ideally, but releasing
// the effect causes a fc it the effect is not a valid state.
// Since we are releasing the effect we can ignore it to avoid
// crash the app
}
}
mCachedEffects.clear();
}
示例3: release
import android.media.effect.Effect; //导入方法依赖的package包/类
public void release() {
Effect effect = effects.remove(this);
if (effect != null) {
effect.release();
}
}