/*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
delete CKEDITOR.instances[ editor.name ];\r
};\r
\r
+/**\r
+ * Perform global clean up to free as much memory as possible\r
+ * when there are no instances left\r
+ */\r
+CKEDITOR.on( 'instanceDestroyed', function ()\r
+ {\r
+ if ( CKEDITOR.tools.isEmpty( this.instances ) )\r
+ CKEDITOR.fire( 'reset' );\r
+ });\r
+\r
// Load the bootstrap script.\r
CKEDITOR.loader.load( 'core/_bootstrap' ); // @Packager.RemoveLine\r
\r
* @example\r
*/\r
CKEDITOR.TRISTATE_DISABLED = 0;\r
+\r
+/**\r
+ * Fired when the CKEDITOR.currentInstance object reference changes. This may\r
+ * happen when setting the focus on different editor instances in the page.\r
+ * @name CKEDITOR#currentInstance\r
+ * @event\r
+ */\r