[wp-trac] [WordPress Trac] #58323: Use static closures whenever $this is not used to avoid memory leaks

WordPress Trac noreply at wordpress.org
Wed May 17 22:44:36 UTC 2023


#58323: Use static closures whenever $this is not used to avoid memory leaks
------------------------------+--------------------------------------------
 Reporter:  westonruter       |       Owner:  westonruter
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  6.3
Component:  General           |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  performance, coding-standards
------------------------------+--------------------------------------------
Changes (by westonruter):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55822" 55822]:
 {{{
 #!CommitTicketReference repository="" revision="55822"
 General: Use `static` on closures whenever `$this` is not used to avoid
 memory leaks.

 Props westonruter, jrf, spacedmonkey.
 Fixes #58323.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58323#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list