-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lifecycle class #1077
lifecycle class #1077
Conversation
removed OnCreated OnRelease for better hot reload.
cleanup Patcher. polish loading/unloading code.
hot unload now works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two issues in code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm besides the points that krzy mentioned.
I m not sure how much is won by the change, since you move global state out of an object that is instantiated by the game and used for lifecycle purposes to global state that lazily instantiates itself and is also meant for lifecycle purposes.
but currently I have no opinion on how to do it better.
the way I normally do that for CSL is also messed up bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
6e8dd6b
to
19d932f
Compare
fixes #767
TMPELifecyckle
)TMPELifecycle
's finalized is called when TMPE is disabled which proves there is no memory leak :) - I think if anyone usesSingleton<TMPELifecyckle>.instance
that would create an extra reference toTMPELifecyckle
which prevents the class from finalization leading to a memory leak.https://ci.appveyor.com/api/projects/krzychu124/tmpe/artifacts/TMPE.zip?branch=life-cycle
depends on PR #1076