-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
core: Remove LoaderHandle when load is done #15115
base: master
Are you sure you want to change the base?
Conversation
In almost all cases, we were letting completed LoaderHandles accumulate, leaking memory and wasting time in `preload_tick`
19edd43
to
c8f4cb6
Compare
Sorry, maybe reviewed too quickly. I notice that some places have the potential to return early with Is there another way we can do this? |
@@ -24,6 +24,12 @@ use super::Avm2; | |||
#[collect(no_drop)] | |||
pub struct Domain<'gc>(GcCell<'gc, DomainData<'gc>>); | |||
|
|||
impl std::fmt::Debug for Domain<'_> { |
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.
Accidentally added?
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.
My guess is Aaron added it, much like the Debug
impls later on, while debugging the memory problems caused by not cleaning up loaders.
I'm personally fine with merging the debug impls alongside everything else. Not being able to trace something because someone forgot to add a Debug
impl is frustrating.
I'm wondering if we can abuse RAII/ |
In almost all cases, we were letting completed LoaderHandles accumulate, leaking memory and wasting time in
preload_tick