Brew singleton
来源:互联网 发布:中海达dat数据导出 编辑:程序博客网 时间:2024/05/19 18:47
When a class is instantiated as a singleton in Brew® Mobile Platform (Brew MP), there can be only one instance of the class within a certain scope. The scope is determined by the environment (or Env) of the caller, or the entire Brew MP system, depending on the type of singleton class instantiated.
既所谓的单件并不是指在所有范围内都只有一个实例,而是在一定范围内.既文中的certain scope,这个范围是由调用者所处的Env(上下文)所决定的.也就是说singleton是在同一个Env中只有一个实例.
Singleton in-process calss:
在Brew Shell中的applet object,每个applet object都运行在各自的Env中,故即使in-process class是singleton类型的,在Brew shell中的applet在实例化这些类时也会在各自的Env中创建实例.也就是实际上没有进行实例共用.
而对于service object,他们或者运行在kernel process(这是一个Env),或者运行在service process中(另一个Env),因此在这些范围内,一个in-process singleton class只会有一个实例.所有调用他们的service object都共用一个实例.
Singleton service:
对于service单件,这个范围这是全系统,所有要访问single service的object都共用一个service实例.由于service object运行在service process中,因此kernel process和BREW process中的对象要访问service object时要使用IPC方式.
- Brew singleton
- Brew
- BREW?。
- BREW
- BREW
- BREW
- BREW
- BREW
- brew
- brew
- brew
- Singleton
- Singleton
- singleton
- Singleton
- Singleton
- Singleton
- Singleton
- 辨别真假虚实:目前网上盛传的Windows 7“SP1”下载和通过修改注册表“更新”是真的吗?
- 易语言代码转HTML 测试(源码方式)
- 构造DataSet(记录)
- 学习ShellExecute
- 彩信相关
- Brew singleton
- 不让Google Nexus One独秀——联想乐phone
- 再谈创业,在谈一个人,在谈一类人
- 为catalog定义别名注意的问题
- 使用toolchain开发iphone程序之连连看
- SQL Server 2005 远程连接
- 常用软件测试方法及类型解析
- 关于windows7的安装
- 程 序 测 试 规 范