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

jQuery empty() #59

Closed
wants to merge 1 commit into from
Closed

jQuery empty() #59

wants to merge 1 commit into from

Conversation

asvny
Copy link
Contributor

@asvny asvny commented Dec 23, 2015

No description provided.

@kafeltz
Copy link

kafeltz commented Dec 23, 2015

I'm wonder if this method for clearing could lead to memory leaks, for example, callback with Interval or Timeout attached in these destroyed elements.

@camsong
Copy link
Owner

camsong commented Dec 24, 2015

@kafeltz it may cause memory leaks, but the reason is up to the developer. Before destroying elements, one should clean all interval or event listeners bind to that elements manually. It's easy to extract a method to do this automatically for a project, but it's hard or impossible to make that method suitable for all projects.

@annamalai-saro can you fix the conflicts?

@asvny
Copy link
Contributor Author

asvny commented Dec 24, 2015

@kafeltz @camsong I agree with you ... Developer should take care of it .
I try to fix the conflicts and then ping u !

@kafeltz
Copy link

kafeltz commented Dec 28, 2015

@camsong @annamalai-saro agreed, it's like to create a "destroy" function pattern in the class. But it's good to be aware of this problem.

@camsong camsong closed this in 0f6e8c0 Dec 29, 2015
camsong added a commit that referenced this pull request Jan 4, 2016
arcthur added a commit that referenced this pull request Jan 4, 2016


* 'master' of https://github.com/oneuijs/You-Dont-Need-jQuery: (94 commits)
  format: code
  add promise section
  feat(utils): add other utils method
  clean: adjust format
  feat(DOM): add `unwrap()` and `replaceWith()`
  feat(DOM): add `.wrap()` method
  update ko-KR
  add jquery empty and close #59
  Update README-ru.md
  Update README.md
  map
  tweat
  inArray
  Update README-ru.md
  Update README-ru.md
  update ko-KR
  Update README.zh-CN.md
  add more tests
  update README
  update readme
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants