• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

メモリワーニングのレベルを知りたいときはこれを使う。 private なんでリジェクとされるという話もあるが、 ソースがオープンなんで大丈夫では?次回のリリースでは 試しに入れてみよう。

で、使い方

   1  
   2  #include <libkern/OSMemoryNotification.h>
   3  
   4  
   5  -	(void)
   6  applicationDidReceiveMemoryWarning:(UIApplication*)p
   7  {	NSLog( @"applicationDidReceiveMemoryWarning:Level:%d", OSMemoryNotificationCurrentLevel() );
   8  }
   9  

ソースは http://www.opensource.apple.com/source/Libc/Libc-498.1.7/sys/OSMemoryNotification.c

posted by Face Saturn on Fri 8 Apr 2011 at 08:18
Contents
OSMemoryNotificationCurrentLevel()
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ