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
Remove use of goog.Disposable() #4950
Conversation
Replacing the use of |
* Objects that need to clean up after themselves. | ||
* @constructor | ||
*/ | ||
ol.Disposable = function() {}; |
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.
Could it be annotated with @struct
like ol.Observable
?
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.
Done with 9b58672.
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.
Actually, marking as @struct
is creating compiler issues with EventTarget
(where it uses bracket notation). See https://travis-ci.org/openlayers/ol3/builds/113174215 for the failures.
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.
Struct is needed for #4793 ; I can make the change after your PR is merged and I rebase on top of it.
This looks great @tschaub. I created a heap snapshot after running all tests from master and from your branch. And your branch results in a smaller heap with less DOM entries. So I'm in favour of merging this. Regarding @gberaudo's comments, I'd not make |
I'm not liking this failure:
|
Ok, the rendering test failure mentioned above was a real issue. But pretty badly buried. The first issue is that when our
At the top of the stack, The real issue is that in the WebGL map renderer's But this convenient So Anyway, it is not clear to me why |
It looks like |
This is really just a speculation, but since it doesn't dispatch any events, I'd say it should inherit from |
+1 for |
I've changed this in e1f0e8d.
I've added this in 2f9d4e6. Thanks for the reviews @gberaudo, @ahocevar, and @fredj. Does this look in good shape to everyone now? |
LGTM, thanks. |
Looks great. Thanks for the hard work @tschaub. Please merge. |
+1 |
Remove use of goog.Disposable().
This replaces
goog.Disposable()
with a simplerol.Disposable()
.