By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

Trying to Dup Memory Leak

P: n/a
In a previous post I talked about what I thought was a memory leak
based on some responses I was getting.

I configured this page below to simulate adding and then deleting rows
dynamically from the page except I can't duplicate the problem.

Here is the example: http://www.hulenbend.net/parent.html

Press the "X" to delete the row. In the page I am developing I get a
"Internet Explorer needs to Close message" after deleting about 14
rows.

Only main difference between this and the real page is that the names
have been changed to protect the innocent and that some of the
functions do not exist.

Anyone have this problem and how did you get around it?

MIke

Oct 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I clicked on the debug button and I could see this data:

The thread 'Win32 Thread' (0xad8) has exited with code 0 (0x0).
Unhandled exception at 0x7c918fea in iexplore.exe: 0xC0000005:
Access violation writing location 0x00000010.

7C918FEA inc dword ptr [eax+10h]

ntdll.dll!7c918fea()

Does this info give any clues to anyone?

Also, this is a cf site using NT with IIS and authentication using
Siteminder.

Any help is appreciated.

Mike

Oct 17 '05 #2

P: n/a
VK
> Here is the example: http://www.hulenbend.net/parent.html

Press the "X" to delete the row. In the page I am developing I get a
"Internet Explorer needs to Close message" after deleting about 14
rows.


The bug is here (you should always post the code, getting external .js
files is boring):
....
function delThisRow(del_num) {
var mydelactionwin;
var mycgi = "/cgi-bin/child.cgi?num=" + del_num;
if ( !mydelactionwin || mydelactionwin.closed ) {
mydelactionwin = window.open(args);
}
mydelactionwin.focus();
}
....

You are declaring a local mydelactionwin variable w/o assignment, so
!mydelactionwin condition is always true, so the whole if-block is
pointless. Your problem is not in the amount of the deleted rows but in
your clicking speed. With enough of speed you're forcing mydelactionwin
to point to several directions (objects) at once including
non-more-existing ones. IE traditionally hates the latter and it gets
crazy. Under an old Win98/233Mhz laptop your script gets dead slow but
it works stable just because I cannot click quick enough with my frozen
mouse :-)

As your mydelactionwin state depends on server-side response you may:
1) Declare mydelactionwin as global variable and lock click actions
until mydelactionwin.closed is true.
2) Create a click buffer and process click by click checking
mydelactionwin.closed each time.

P.S. Standard Ctrl-Click / Shift-Click options to handle multiple rows
at once would be greate. Combining it with the option 1) you're getting
the most convenient and reliable solution (within JavaScript of
course).

Oct 18 '05 #3

P: n/a
Vk, thanks you're right about mydelactionwin. It should be a global
variable.

My solution however was to replace the window.open with creating an
iframe with the src="" and then change it to a valid script that does
the delete from the db, if the data is sucessfully deleted, I'll delete
the row from the parent form.

I finished this up this morning. It works like a champ and there are no
"Internet Explorer needs to Close message" messages.

I am very pleased with it. Thanks for your post.

Oct 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.