如何回收/处理主题使用的位图

rou*_*uen 5 android xamarin.android

我的Xamarin.Android应用程序使用简单的启动画面技术将主题应用于Splash活动:

<resources>
 <style name="SplashTheme" parent="@android:style/Theme.NoTitleBar">
  <item name="android:background">@drawable/bluebg</item>
 </style>
</resources>
Run Code Online (Sandbox Code Playgroud)

[Activity(Label = "Splushy Splushy", MainLauncher = true, Theme = "@style/SplashTheme")]
public class SplashActivity : Activity
{ ... }
Run Code Online (Sandbox Code Playgroud)

但似乎在启动画面上使用的图像(PNG,80 KB)在我的应用程序运行的整个过程中,内存中的内存大小为12 MB(有和没有启动的内存使用之间的差异)(另一项活动,永远不会回头)自然地飞溅屏幕).

有没有办法摆脱活动主题使用的资源,所以我的内存占用不会变得不必要的大?谢谢.

erk*_*ldz 0

我本来想将其添加到评论中,但不能。

您是否尝试在打开新的启动活动后关闭启动活动?

StartActivity(typeof(NextActivity));
this.Finish();
Run Code Online (Sandbox Code Playgroud)