1. First, a test environment must be fixed. Specifically, select one of the actions that can be repeated as a standard test action.
2. After refreshing the browser, use Profiler to grasp the heap snapshot.
3. Perform the operation, and once again grasp the snapshot and repeat the comparison several times.
As seen in the comparison page, these objects are growing between multiple snapshot. Investigate this object in depth
Found a very strange method to call.
We found our code.
var domselectionselectrangesmethod =function (ranges) { try { Domselectionselectrangesmethod.call (this, ranges); Catch (e) { }};
Then look at the source code of CKEditor, found in CKEditor, selection is just a constructor, Selectranges is the method of the prototype.
The problem code could not modify the method on the prototype, but wrapped it over and over again in vain on the constructor. The context of these methods causes a memory leak.
Use Chrome's profiler to find JS memory leak