Very creative test. I have run it in IE 7 and firefox3.5.6 pre and
they show leaks.

On Nov 11, 2:54 am, Ben <[email protected]> wrote:
> Hi!
>
> On using the jquery datepicker we expierience major memory leaks in
> our application (especially IE6).
> After carefully examining our code for leftover event bindings and
> other DOM/Script links I was not unable to spot the problem so I
> assumed it origins within the jquery datepicker.
>
> I wrote a simple testcase which demonstrates the problem, though the
> memory growth rate is much higher in our application (probably due to
> the much complexer AJAX screen). Just open it in i.e. and watch its
> memory consumption growing slowly.
>
> Any hints on that? Do you see any usage errors?
>
> Thanks for your support!
> -Ben
>
> Here's the testcase:
>
> <HTML>
> <HEAD>
>     <title>jQuery UI Datepicker - Demonstrate IE6 Leak</title>
>     <!--<script type="text/javascript" src="../jquery/
> jquery-1.3.2.js"></script>
>     <script type="text/javascript" src="jquery-ui-1.7.2.custom.js"></
> script>-->
>
>     <link type="text/css" href="http://jqueryui.com/themes/base/
> ui.all.css" rel="stylesheet" />
>     <script type="text/javascript" src="http://jqueryui.com/
> jquery-1.3.2.js"></script>
>     <script type="text/javascript" src="http://jqueryui.com/ui/
> ui.core.js"></script>
>     <script type="text/javascript" src="http://jqueryui.com/ui/
> ui.datepicker.js"></script>
>
>     <script type="text/javascript">
>         var run = true;
>
>         function destroyPicker() {
>             $("#datepicker").hide();
>             $("#datepicker").datepicker('destroy');
>             setTimeout(createPicker, 150);
>         }
>
>         function createPicker() {
>             $("#datepicker").show();
>             $("#datepicker").datepicker({duration : ''} );
>             setTimeout(focusPicker, 150);
>         }
>
>         function focusPicker() {
>             $("#datepicker").focus();
>             setTimeout(focusInput, 300);
>         }
>
>         function focusInput() {
>             // Fake a click outside datepicker
>             $("#fakeinput").click();
>             $("#fakeinput").mousedown();
>
>             if (run) {
>                 setTimeout(destroyPicker, 300);
>             }
>         }
>
>         $(function() { // body.onload
>             createPicker();
>         });
>     </script>
> </HEAD>
>
> <body>
>
> <div class="demo">
>     <p align="center">Date: <input type="text" id="datepicker"></p>
>     <p>Just a fake input: <input type="text" id="fakeinput"></p>
>     <p><input type="button" value="Abort loop"
> onclick="javascript:run=false;"/></p>
>     <p><input type="button" value="GarbageCollect (IE only)"
> onclick="javascript:CollectGarbage();"/></p>
>
> </div>
>
> <div class="demo-description">
>
>     <p>The datepicker is tied to a standard form input field. Focus on
> the input
>         (click, or use the tab key) to open an interactive calendar in
> a small overlay.
>         Choose a date, click elsewhere on the page (blur the input),
> or hit the Esc key to close.
>         If a date is chosen, feedback is shown as the input's value.</
> p>
>
> </div>
>
> </body>
> </HTML>

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=.


Reply via email to