次の方法で共有


MemoryFile.AllowPurging(Boolean) メソッド

定義

メモリ ファイルの消去を有効または無効にします。

[Android.Runtime.Register("allowPurging", "(Z)Z", "GetAllowPurging_ZHandler")]
public virtual bool AllowPurging (bool allowPurging);
[<Android.Runtime.Register("allowPurging", "(Z)Z", "GetAllowPurging_ZHandler")>]
abstract member AllowPurging : bool -> bool
override this.AllowPurging : bool -> bool

パラメーター

allowPurging
Boolean

オペレーティング システムがメモリ不足の状況でファイルの内容を消去できる場合は true

戻り値

allowPurging の以前の値

属性

例外

注釈

メモリ ファイルの消去を有効または無効にします。

このメンバーは非推奨とされます。 消去可能は、一般的に脆弱で安全に使用するのが難しいと見なされます。 アプリケーションでは、代わりに を使用 android.content.ComponentCallbacks2#onTrimMemory(int) してメモリ イベントに対応し、必要に応じて共有メモリ領域を解放することをお勧めします。

android.os.MemoryFile.allowPurging(boolean)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象