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

See #12423.


git-svn-id: https://develop.svn.wordpress.org/trunk@41852 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-10-13 04:33:26 +00:00
parent 8bf9afb4f4
commit 27a33509fb
1 changed files with 0 additions and 11 deletions

View File

@ -25,14 +25,6 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
onUpdateErrorNotice: function() {}
};
/**
* All instances of code editors.
*
* @since 4.9.0
* @type {Array.<CodeEditorInstance>}
*/
wp.codeEditor.instances = [];
/**
* Configure linting.
*
@ -252,9 +244,6 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
codemirror: codemirror
};
// Keep track of the instances that have been created.
wp.codeEditor.instances.push( instance );
if ( codemirror.showHint ) {
codemirror.on( 'keyup', function( editor, event ) { // eslint-disable-line complexity
var shouldAutocomplete, isAlphaKey = /^[a-zA-Z]$/.test( event.key ), lineBeforeCursor, innerMode, token;