Comments (12)
Hm, need to check this more in detail but that issue is new or it broke because of missing androidx compatability.
from mosby.
Not sure androidx compatibility is an issue because only the package name were changed from android.support to androidx.
But this is just a guess, I am only aware of what android documentation states
Also I have jetifier enabled so mosby byte code is change to access the correct package from android.support to androidx.
I want to continue to use this library and with a few tweaks I am able to use it with Android Navigation component by only using fragments.
Thanks for the reply.
from mosby.
More digging i found out the INSTANCE might be a "constant" referenced somewhere that is the Synthetic class itself
I just hope this is not kotlin's fault.
Neither mosby, but i still dont know how is this happening.
from mosby.
At first sight this seems to be the View interface object which is the fragment 🤔
But this is not possible because the subscription to View is being canceled when fragment is onStop().
And TakePhotoFragment already was GC
I can only see companion objects here
And the TakePhotoFragment$Companion doesnt have any reference to any presenter except to a TAG string field
from mosby.
from mosby.
The companion object is the one declared in the TakePhotoFragment, it only has a TAG property to use in logs.
There is no big issue with this companion object
My concern is only those synthetic classes from bindintent() method from the previous screenshots I posted, that have an object allocation for each view method.
Like I said, not sure if is kotlin or mosby the source of this issue, but the profiler is telling that those synthetic classes have one corresponding instance and are using 40 bytes on shallow size and 40 on retained size.
By themselves they are not referencing any other object in the heap, but are stuck there still don't know why.
They must be being referenced somewhere as the GC cannot collect them.
This is some dark magic.
I will need to dig more on this
from mosby.
Checked kotlin issue tracker and found this.
from mosby.
Instead of using lambdas with SAM conversion, I will use object expression for the intent() ViewIntentBinder and check what happens
from mosby.
My suspicions are true after all.
Converted all Lambda SAM conversions into object expressions making the code a bit ugly and larger
(Changed Android studio Theme BTW)
But after GC all previous synthetic classes instances are no longer allocated 😕
So this seems to by a kotlin issue rather than mosby.
from mosby.
Now, to reduce the code size i will try to use Anonymous functions instead of Object Expressions and see if this also works
from mosby.
And their are back with Anonymous functions 😢
from mosby.
Never mind
The issue continue....
from mosby.
Related Issues (20)
- Logo/Icon Proposal
- How can I use it by extents Activity rather than AppCompatActivity? HOT 2
- [SOLVED?] `sample-mvi` crashes on Start HOT 17
- There is an NPE in MenuPresenter if i try to start the sample mail app (but not only there) HOT 3
- Add androidx support HOT 1
- Stop accessing non-public fields in Fragment HOT 25
- Each use of ifViewAttached adds a lot of redundant code HOT 2
- View should load it's content after reusing retained fragment after screen is back on HOT 1
- MVI + LocationProvider HOT 1
- Can ifViewAttached return result of last statement in its scope? HOT 2
- the doubt of MVI in actual projects
- MVP ViewState, restoreInstanceState is not called
- MvpNullObjectBasePresenter + R8 = ClassCastException HOT 3
- java.lang.IllegalAccessError: Method 'boolean androidx.fragment.app.Fragment.isInBackStack()' is inaccessible to class 'androidx.core.app.BackstackAccessor' HOT 1
- Kotlin - Flow - possibly Multiplatform impl HOT 1
- Mosby V4 - AndroidX support HOT 10
- Accessibility talkback approach with MVI
- MviConductorLifecycleListener : call destroy on null presenter
- Fatal Exception: java.lang.IllegalArgumentException: The generic type <V extends MvpView> must be the first generic type argument of class HOT 3
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 mosby.