Skip to content
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

[Docu] Add information at Element.empty #2378

Closed
marcj opened this issue Jul 2, 2012 · 1 comment
Closed

[Docu] Add information at Element.empty #2378

marcj opened this issue Jul 2, 2012 · 1 comment

Comments

@marcj
Copy link

marcj commented Jul 2, 2012

Developers should get a information that Element.empty fires only dispose (against my first guess of destroy) on all children. Maybe a advise like Call myElement.getChildren().destroy() to prepare all items for garbage collection should help, too.

I didn't know it before I have took a look into the code and have now some troubles resulting out this.

Also possible: since nobody should know it without looking in the code, I would recommend to call destroy instead of dispose like @kentaromiura it did in his pull request #2351 (4c68d39) to prevent a memory leak. But the hint mentioned above should also do it.

@DimitarChristoff
Copy link
Member

in all fairness, yes, http://mootools.net/docs/core/Element/Element#Element:empty is probably a bit vague. as a whole, it would be awesome if methods could be linked to a line on github where the source can be seen. in the meanwhile, if you feel that you can improve on the current documentation, here is the file: https://github.com/mootools/mootools-core/blob/master/Docs/Element/Element.md#element-method-empty-elementempty - fork, clone, make a branch quoting this issue, edit/update, test, push, send pull request.

@ibolmo ibolmo closed this as completed in 05a89f9 Mar 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants