Opened 11 years ago

Closed 7 years ago

#2521 closed Bug (wontfix)

Memory leak issue

Reported by: siamakh Owned by:
Priority: Must have (possibly next milestone) Milestone:
Component: General Version: FCKeditor 2.3.2
Keywords: Cc:

Description

I am experiencing a memory leak on the client side. I have installed fck editor 2.6.3. I created the below test.html under fckeditor/html folder. Please try this and click on addFCk and removeFCK (in the same order) for several times and notice that the memory used by the internet browser grows more and more.

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>

<title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script>

</head> <body>

<p><a href="javascript:;" onclick="addFCK();">Add FCK</a></p>

<p><a href="javascript:;" onclick="removeFCK();">Remove FCK</a></p>

<div id="myDiv">

This sample displays a normal HTML form with an FCKeditor with full features enabled.

</div> <hr /> <script type="text/javascript"> <!-- Automatically calculates the editor base path based on the _samples directory. This is usefull only for these samples. A real application should use something like this: oFCKeditor.BasePath = '/fckeditor/' ; '/fckeditor/' is the default value. function addFCK() {

var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;

var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 300 ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;

var newdiv = document.createElement('div'); newdiv.setAttribute('id','fckDiv'); newdiv.innerHTML = oFCKeditor.CreateHtml() ;

var myDiv = document.getElementById('myDiv'); myDiv.appendChild(newdiv);

}

function removeFCK() {

var myDiv = document.getElementById('myDiv'); var fckDiv = document.getElementById('fckDiv'); myDiv.removeChild(fckDiv);

} --> </script> <br />

</body> </html>

Attachments (1)

text.htm (1.6 KB) - added by Artur Formella 11 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 years ago by siamakh

Milestone: FCKeditor 2.6.4
Summary: memory leak issueMemory leak issue: memory not released after setting div.innerHtml to fckeditor.CreateHtml() and then removing the div
Version: FCKeditor 2.6.3

comment:2 Changed 11 years ago by siamakh

Milestone: FCKeditor 2.6.4

comment:3 Changed 11 years ago by Artur Formella

Keywords: Pending added
Priority: HighNormal
Summary: Memory leak issue: memory not released after setting div.innerHtml to fckeditor.CreateHtml() and then removing the divMemory leak issue

Confirmed in IE7 but I think you should clear variables in removeFCK(). I attached modified test.html. Please try it and let me know if you have any problems.

Changed 11 years ago by Artur Formella

Attachment: text.htm added

comment:4 Changed 11 years ago by siamakh

I tried the modified test.html but the problem still persists: memory usages increases after each addFCK and removeFCK. Note that this problem happens on both IE and FF. (I tried with IE7 and FF3)

comment:5 Changed 11 years ago by Artur Formella

Keywords: Confirmed added; Pending removed
Version: FCKeditor 2.6.3FCKeditor 2.3.2

I made some tests. Results of FCKeditor 2.6.3 test:

IE7 Vista32 (1GB RAM)
Empty 9MB
1.	21,0	(+12 MB)
2.	21,8	(+0,8 MB)
3.	26,6	(+4,8 MB)
4.	27,3	(+0,7 MB)
5.	26,9	(-0,4 MB)
6.	27,8	(+0,9 MB)
7.	28,2	(+0,4 MB)
8.	28,4	(+0,2 MB)
9.	28,4	(+0MB)
10.	28,5	(+0,1 MB)
11.	28,5	(+0 MB)
12.	28,8	(+0,4 MB)

FF3 Vista32 (1GB RAM)
Empty 29MB
1.	34,0	(+5,0 MB)
2.	37,0	(+3,0 MB)
3.	41,1	(+3,1 MB)
4.	44,1	(+3,0 MB)
5.	42,2	(-1,9 MB)
6.	43,0	(+0,8 MB)
7.	46,0	(+3,0 MB)
8.	47,3	(+2,3 MB)
9.	49,3	(+2,0 MB)
10.	58,4	(+9,1 MB)
11.	58,5	(+0,1 MB)
12.	61,0	(+2,5 MB)

FF3+Firebug Vista32 (1GB RAM)
Empty 36MB
1.	42,0	(+6,0 MB)
2.	49,1	(+7,1 MB)
3.	51,0	(+1,9 MB)
4.	58,6	(+7,6 MB)
5.	62,5	(+3,9 MB)
6.	72,4	(+9,9 MB)
7.	72,8	(+0,4 MB)
8.	74,8	(+2,0 MB)
9.	75,5	(+0,7 MB)
10.	75,5	(+0 MB)
11.	79,9	(+4,4 MB)
12.	89,2	(+9,8 MB)

comment:6 Changed 10 years ago by siamakh

Priority: NormalHigh

This is a rather major issue. wonder if anyone will address it?

comment:7 Changed 7 years ago by Jakub Ś

Resolution: wontfix
Status: confirmedclosed

FCKeditor was retired and is no longer supported. All active development was moved to its successor, CKEditor 3.x, that is a fully mature and far superior product. We recommend you upgrade as soon as possible since this issue is no longer a problem in current code base.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy