Skip to content

Commit

Permalink
尽量不要。
Browse files Browse the repository at this point in the history
  • Loading branch information
mlcldh committed May 7, 2019
1 parent e147531 commit 94320dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -169,5 +169,5 @@ LCChat是私信模块。LCChatModule提供读取消息未读数和跳转到单
1. 组件协议的方法都要写成实例方法,不要写成类方法。
2. 组件协议的方法都要实现,因为调用时不会去判断方法有没有实现。
3. 获取组件协议实现的实例对象,只能使用LCModuleInstance(module,LCModuleProtocol) 或LCGetModuleInstance(LCModuleProtocol)这两个个宏,从而避免直接使用LCModuleInstanceFromProtocol获取到实现类,让实现类执行了其并不遵守的协议方法。
4. 组件协议实现的实例对象只是用来负责组件通信的,不要用它们来存储其他东西,因为这些实例对象一直不会去释放,存储太多东西,容易出现内存占用过多的问题。
4. 组件协议实现的实例对象只是用来负责组件通信的,尽量不要用它们来存储其他东西,因为这些实例对象一直不会去释放,存储太多东西,容易出现内存占用过多的问题。

0 comments on commit 94320dc

Please sign in to comment.