#11 Memory leak?

open
nobody
None
5
2006-04-13
2006-04-13
No

Here is a sample of the memory usage of TexShop. The first line is after
launching the application. Then I typeset one document with pdflatex
between each line.

Real Virtual Memory
TeXShop 15.65 MB 367.21 MB
TeXShop 17.22 MB 368.23 MB
TeXShop 17.98 MB 369.78 MB
TeXShop 18.60 MB 370.32 MB
TeXShop 19.20 MB 370.86 MB
TeXShop 19.86 MB 371.39 MB
TeXShop 20.52 MB 371.93 MB
TeXShop 21.16 MB 372.47 MB
TeXShop 21.81 MB 373.02 MB
…………………………………………………

As it should be obvious, TexShop keeps eating more and more memory
and it can reach in the several hundreds MB.

This is totally reproducible.

Configuration: MacBook Pro (Rev 1), 2 GB RAM
MacOS 10.4.6
TeXShop Version 2 (2.09b)

Discussion

  • Luc J. Bourhis

    Luc J. Bourhis - 2006-04-13

    Logged In: YES
    user_id=710708

    I am pretty sure I found the problem. The following fix in MyPDFKitView.m
    solves the memory leak, as attested by MallocDebug

    //
    -----------------------------------------------------------------
    ---------------------------- outlineView:child:ofItem

    - (id) outlineView: (NSOutlineView *) outlineView child: (int) index ofItem: (id)
    item
    {
    if (item == NULL)
    {
    if (_outline)
    return [_outline childAtIndex: index];
    else
    return NULL;
    }
    else
    return [(PDFOutline *)item childAtIndex: index];
    }

    HtH

     
  • Luc J. Bourhis

    Luc J. Bourhis - 2006-04-13

    Logged In: YES
    user_id=710708

    Nope. After all, that memory leak reported by MallocDebug was tiny and the one
    Activity Monitor seems to reveal is still there even after that fix.

     
  • Luc J. Bourhis

    Luc J. Bourhis - 2006-04-18

    Logged In: YES
    user_id=710708

    OK, apparently I failed for a known problem
    defaults write TeXShop ReleaseDocumentClasses 0
    was actually set to 1!

    Sorry about the fuss…

     
  • Gary L. Gray

    Gary L. Gray - 2006-06-05

    Logged In: YES
    user_id=1474534

    The same thing happens to me except that it goes up by more than what you
    show each time. This is with TeXShop 2.10beta on a MacBook Pro running Mac
    OS X 10.4.6.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks