[wp-trac] [WordPress Trac] #58323: Use static closures whenever $this is not used to avoid memory leaks
WordPress Trac
noreply at wordpress.org
Tue May 16 00:12:07 UTC 2023
#58323: Use static closures whenever $this is not used to avoid memory leaks
-------------------------+--------------------------------------------
Reporter: westonruter | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance, coding-standards
-------------------------+--------------------------------------------
Changes (by jrf):
* keywords: has-patch has-unit-tests => has-patch
* focuses: performance => performance, coding-standards
Comment:
I've left a detailed review on the PR.
Summary:
* Making closures which don't use `$this` `static` is a good improvement.
* Including the Slevomat sniff is out of the question.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58323#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list