Comments (5)
恩,是的。这个很有必要,BeeHive会把注册服务变成"单例"。延长了生命周期
from beehive.
这是一个设计模式的问题 如果允许注销service的话 容易导致其它模块里API调用不可用。同时注销的行为对于其它模块也是不可见的。我能想到的一种解决方法是,当发现API不可用的时候,去查询API归属的service,然后重新自动注册servcie 类似比较常见的多进程模块唤起机制。不知道有没有更好的解题思路
from beehive.
@rexqin service
在使用之前是通过- (id)createService:(Protocol *)service
来获得实例的,每次都会重新生成(单例除外),普通service
实例生成后会被保存到BHContext
的servicesByName
字典中,而不能够被释放的问题,除非再次生成实例重新保存时才能释放旧的实例。而保存起来的实例,好像并没有什么用处。
通过Protocol
生成的service
,应该在超出自己的作用域之后自动释放才对吧?
from beehive.
这个现在已经不存在了吧
from beehive.
看现在的代码实现里只有singleton
才会被持有了,这个issue可以关闭了吧?
from beehive.
Related Issues (20)
- 发现BHRouter中有多处逻辑BUG
- double-free Crash信息 HOT 1
- 方法注册是在load中好呢还是使用BeeHiveService(servicename,impl)好呢?两者有何区别 HOT 15
- 为何独缺application:didFinishLaunchingWithOptions事件呢?
- 这个库swift是不能使用的。如果要用,自己+生命周期的处理。
- 注解造成的内存泄漏 HOT 2
- 推送收不到的奇怪问题 HOT 3
- 字典多线程安全问题 HOT 1
- 对于原来就是一个单例的类,如何保证这个声明service的对象还是唯一的
- 希望作者能完善一下BHRouter的Demo!!! HOT 5
- 一个VC对应一个一个Protocol
- moudle里的modInit有时候不会执行 不知道是否是注册失败 HOT 3
- 希望Demo能够补充一下BHRouter的用法 HOT 2
- BHRouter canOpenURL 校验时错误
- msgbus Bee
- 建议在`BHServiceManager.h` 中把获取类名的方法也给暴露出来;而 createService 只提供返回了实体对象。
- BeeHive的原理大概是这样子的
- @BeeHiveService 前面的@ 可以理解调用宏定义吗 HOT 4
- BHAnnotation中dyld_callback会被多次调用 HOT 1
- 请问项目还在维护吗?以后会兼容swift吗? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beehive.