ming1016 / architecturedemo Goto Github PK
View Code? Open in Web Editor NEWArchitectureDemo,基于 CTMediator 扩展
License: Apache License 2.0
ArchitectureDemo,基于 CTMediator 扩展
License: Apache License 2.0
在 Cdnt.m
的 - (id)classMethod:(NSString *)classMethod parameters:(NSDictionary *)parameters
方法中,有这样的一段代码
在判断是否响应 notFoundMethod
后,应该调用的也是它,这是个笔误。
这里的 Cdnt
-> ButtonCom
-> [[bt rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:
-> block
-> vc(FirstVC)
-> Cdnt
,最终构成了一个保留环,让 FirstVC
不能释放。
个人思路:在这个地方我能想到的就是在 block
中使用 vc
时,用 __weak
来处理下,避免被 block
强引用。
还有一个 factoryVC
和 publishVC
实例化的早了,会被 block
捕获,问题就是 FirstVC
的实例对象不销毁,这两个实例就会一直在内存中,即使页面 pop
了,dealloc
还是不执行。
个人思路:把创建的时机放入 block
内,即用时再创建。
self.dispatch(CdntAction.clsmtd(@"FirstListCom pushVC").pa(Dic.create.key(@"vc").val(vc).key(@"toVc").val([self classMethod:@"VCGeneratorCom publishVC"]).done));
不知道是不是我的理解有误,如果我的理解有误,还请告知我的想法哪儿错了;如果我的理解是对的,您还有没有更好的方式呢。谢谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.