-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
#8843 Clean up request data references #8883
#8843 Clean up request data references #8883
Conversation
… unintentional retained request data memory
Thanks for the pull request @bn-dignitas!
Reviewers, don't forget to make sure that:
|
@mramato I think this is ready. Did you have any other comments? Should we add a note to CHANGES.md? |
Sorry, I meant to tag @lilleyse since I think he was the one that originally confirmed the issue was request/tile related and knows this area of the code. Sean? |
I should have a chance to review later tonight. |
Looks good to me. Nothing to add from what @mramato said. I opened a companion PR to fix this at the @itsegg could you check if this branch fixes your issue in #4549 (comment)? |
@lilleyse |
# Conflicts: # CONTRIBUTORS.md
Thanks @bn-dignitas! |
Updated |
@@ -182,6 +182,8 @@ function getRequestReceivedFunction(request) { | |||
requestCompletedEvent.raiseEvent(); | |||
request.state = RequestState.RECEIVED; | |||
request.deferred.resolve(results); | |||
// explicitly set to undefined to ensure GC of request response data. See #8843 | |||
request.deferred = undefined; |
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.
@lilleyse I have a regression introduced by this change, but it may be an unrelated bug that this is just covering up, not sure. Either way it's a RequestScheduler issue. I'm trying to create a simple reproduction now and then I'll write it up. Hopefully it's an easy fix (since you know this code way better than I do).
Fix for #8843 Clear Request cancelFunction and deferred references to free up unintentional retained request data memory