Skip to content

Commit

Permalink
Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
rushter committed Jan 21, 2024
1 parent acaa7d3 commit 4c95675
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGES.rst
@@ -1,6 +1,14 @@
selectolax Changelog
====================

Version 0.3.15
-------------

Released

- Fix memory leak when using CSS selectors, `lexbor` backend


Version 0.3.17
-------------

Expand Down
2 changes: 1 addition & 1 deletion selectolax/lexbor.pyx
Expand Up @@ -237,7 +237,7 @@ cdef class LexborHTMLParser:
def select(self, query=None):
"""Select nodes give a CSS selector.
Works similarly to the the ``css`` method, but supports chained filtering and extra features.
Works similarly to the ``css`` method, but supports chained filtering and extra features.
Parameters
----------
Expand Down
1 change: 1 addition & 0 deletions selectolax/lexbor/selection.pxi
Expand Up @@ -72,6 +72,7 @@ cdef class LexborCSSSelector:
raise SelectolaxError("Can't parse CSS selector.")
result = bool(self.results)
self.results = []
lxb_css_selector_list_destroy_memory(selectors_list)
return result


Expand Down

0 comments on commit 4c95675

Please sign in to comment.