I think I found the problem.

I had an object I was using to store a list of elements that was being
shared between a number of other objects. Before doing a loop to
determine what I needed to include in the object I'd clear out the old
values.  At first I was doing it like this:

foo = {};

but I discovered this led to a problem.  Because there was two
references to the original object, the second reference would still
point to the old object and the old values.

I thought I could work around this problem by simply maintaining the
object and deleting all its members, like this:

for (var bar in foo)
{
        delete (foo [bar]);
}

This appears to be what's causing Opera 8 to crash.  Opera 9 and the
other browsers handle it without problem.

Is there a way to delete all the members of an object without actually
destroying the object itself and that will work in Opera 8?

On Aug 8, 12:06 pm, Gordon <[EMAIL PROTECTED]> wrote:
> Does anyone know if there is a list of known JavaScript bugs for Opera
> 8?  I did a significant rewrite of a section of code recently for a
> speedup.  The speedup I got was pretty massive, especially so in IE,
> and it works in all my test browsers (IE6 and 7, Firefox 1.5, Safari 3
> beta and Opera 9), but it causes a massive crash in Opera 8.
>
> I was originally doing a $.each on an object but when I discovered
> that doing return (false) doesn't seem to break you out of a loop like
> the documentation claims it will I changed to using for (bar in foo)
> iterators instead and breaking to a label outside the loop to
> terminate the loop early.  I suspect this might be what's causing he
> opera 8 crash but I have no way to be sure, or how to work around it
> if it is the case, or how to determine what the real issue is and what
> do do about it if it is not the case.

Reply via email to