added callbacks for onLowMemory and onTrimMemory