473,776 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

World Leaks in Safari, any clues to track down?

dd
I have a page that works just fine on all OS'es/Browsers
except Safari. When I close the page I get a world leak
triggered by the JavaScript Interpreter. I know most people
don't have the "always check for world leaks" on, so it's
not like it's going to happen for Joe user, but I've got some
code that Safari's JS interpreter isn't happy with and I want
to track it down. Just like I do with anything that appears
in the Firefox console, even if it's only a warning.

Anyone have any useful tips for tracking down stuff in
Safari? I was planning to start adding a return statement in
my onunload handling code (because it only happens when
I close the browser) and move the return further and further
towards the end of the function, assuming that it'll keep
working and working and then eventually I'll move the return
to after the code that causes the world leak. It's annoying
and time-consuming though :(

Jan 17 '07 #1
3 1941
dd
Forgot to mention I'm using Safari 10.3.2 (I can't get it
to upgrade further than that because I'm stuck on OSX
10.3.9 and newer versions of OSX come on DVD and
my crappy iBook only has CDROM)...

Jan 17 '07 #2
VK
dd wrote:
Forgot to mention I'm using Safari 10.3.2
That's hardly given that the most recent version is only 2.0.4 ;-)
That must be MacOS version 10.3.2, so Safari is no higher then than 1.3
- that makes it pretty useless for debugging. It's like debugging right
now on Mac IE 5.0 in hope to become ready for Win IE 6 and 7. Most of
workarounds made will not be necessary, and the necessary workarounds
will not be found. If you are targeted to cover Safari as well, then
sorry but you need 2.0.4 - this is the only usable and anyhow
acknowledged Safari version. Also you can get yourselve a nightly build
from <http://webkit.org/But I cannot guarantee that it will go on
10.3.2

As not a definitive guide of any kind but as recommendations that might
be useful see also:
<http://developer.yahoo .com/yui/articles/gbs/gbs_browser-chart.html>
<http://developer.yahoo .com/yui/articles/gbs/gbs.html>

Jan 17 '07 #3
dd
Yeah I know I need Tiger. The annoying thing is, I have
the DVD for it, I just can't stick the darned thing in the
drive :(

Unfortunately my delivery matrix goes back to Safari
1.2 so I have to support it.

Luckily I just found the problem. Run-on cases in a
switch statement. Safari JS interpreter doesn't like
them. Here's what I had, reduced to example code:

switch(p.charAt (0))
{
case "I":break;
case "C":
case "U":break;
case "T":break;
default:break;
}

I'm switching on a character rather than a number,
but the crucial thing is the lack of a break on the
"C" case because I want it to run through into the
"U" case. Obviously I've taken the actual code out
of the example just to leave the underlying structure.

Once I put that break in, Safari is happy again. No
more world leaks.

Jan 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2327
by: windandwaves | last post by:
Hi Folk, Below is a message that I posted on alt.html I now have some more feedback from people who experienced an error with safari and they tell me that the PHPsessID changes while running a search. Does anyone know anything about safari not registering session IDs? -----------original message--------------------------------- Please have a look at www.friars.co.nz/search.php
8
3692
by: Beam_Us_Up_Scotty | last post by:
Hello all, I am trying to write a "simple" animation using C#, and I've tried many things but nothing seems to work for me without leaking memory. Here's a very simple piece of code that uses a timer to set the image of a label from an ImageList every 100ms or so. This is what was being used when I inherited this piece of code, and I thought it was OK, until I changed the size of the label to do animation on a larger piece of screen...
7
3910
by: Gary Townsend | last post by:
I have written a program in vb .net and want to go about trying to track down a memory leak when i run my program and monitor it using the task manager in windows 2k my program has a stead progression of memory usage upwards. I have done all the well behaved things such as using dispose where i can. So i guess i need to try and track down where approximately i am using up my memory. Any suggestions?
5
1625
by: cnickl | last post by:
Some time ago I was looking for a cheap or free way to check an application written in C# and some unsafe code for memory leaks. Someone in this forum suggested DevPartner form Compuware, telling me that there is a free basic version out there. However I can’t find it. Nowhere on the Compuware website is a link to anything under $4000. Am I just missing something? Are there other ways to check for memory leaks than 3rd party products?
6
5576
by: nmehring | last post by:
I have an MFC app with 2000 users. I have one user that experiences a crash in our software anywhere from 1 to 5 times a week when opening a particular module. No other users have reported this particular crash so I don't think anyone else is experiencing it but I know other users are doing exactly what she is doing because it is our most popular module. I have analyzed the dmp files from several of this user's crashes using windbg...
11
2460
by: Stevo | last post by:
I've been using the unload event for a long time. I have this code, which I've abstracted and made into a stripped down simple test case below, and it works fine on the major browsers (IE5+, Firefox, Opera). It also works for all Safari versions before 3.1. It's as if they've deliberately made a change to prevent some actions in the unload handler. Has anyone heard of such a restriction? Here's the test case:
6
1553
by: BMc | last post by:
So, as per Beauregard's suggestion, I have delved into the world of percentages and more fluid design for my next project. I am going along okay so far and have already determined that I will be doing a conditional comment for a separate Stylesheet for IE but I am having a problem now in Firefox, Safari, and Opera. If you would like to see my problem, please visit http://myweb.fltg.net/users/bethmcgee/index.html
13
1551
by: BMc | last post by:
I just want to take a moment to say thank you to so many of you who posted a response to my request for help about the problem with THE GAP (see below?)! Your suggestions were not only a solution to the problem, but they were given in a way that encouraged further learning about the subject and gave me more information that helped me move forward today. I have actually gotten the page to work with the same style sheet for ff, opera,...
11
4237
by: dhtml | last post by:
(originally mis-posted on m.p.s.jscript...) I've just closed all windows in Firefox and its using 244MB of memory. I have no idea why. I had GMail open, a page from unicode, the CLJ FAQ. I've noticed that createElement leaks. It's obvious with form controls because the form keeps the control name as a property. Example:
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10292
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.