Make WordPress Core

Changeset 41852


Ignore:
Timestamp:
10/13/2017 04:33:26 AM (9 years ago)
Author:
westonruter
Message:

Code Editor: Remove keeping track of wp.codeEditor instances since unused and no removal of instances upon deletion, leading to memory leak.

See #12423.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/code-editor.js

    r41385 r41852  
    2525                onUpdateErrorNotice: function() {}
    2626        };
    27 
    28         /**
    29          * All instances of code editors.
    30          *
    31          * @since 4.9.0
    32          * @type {Array.<CodeEditorInstance>}
    33          */
    34         wp.codeEditor.instances = [];
    3527
    3628        /**
    … …  
    252244                        codemirror: codemirror
    253245                };
    254 
    255                 // Keep track of the instances that have been created.
    256                 wp.codeEditor.instances.push( instance );
    257246
    258247                if ( codemirror.showHint ) {
Note: See TracChangeset for help on using the changeset viewer.