ImageBrowser and Garbage Collection

  • I'm attempting to use an IKImageBrowserView in an application with
    garbage collection, but have run into serious memory problems.

    The problem is easily produced using the ImageBrowser sample code:
    http://developer.apple.com/samplecode/ImageBrowser/index.html

    If you compile and build the application under the default conditions
    (no gc), adding about 500 typical digital photos barely budges the
    memory footprint of the app. However, if you enable garbage collection
    and do the same, the app will consume its 4.0 GB of ram, before
    hitting the ceiling and crashing. Even a more mundane experiment of
    adding a few photos shows that it doesn't manage to reclaim its memory
    after loading the photos.

    Within the application a thread it spawned to add new photos, but it
    seems to register with garbage collector just fine and wouldn't be a
    problem memory-wise anyway. The problem, from what I can tell, is a
    separate thread launched by IKImageBrowserView for generating the
    thumbnails that doesn't get it's memory reclaimed.

    Being new garbage collection, I'm not sure what to make of this -- any
    insight on how to fix this???

    Jeffrey
  • While I believe this is a known issue, please file a bug at
    bugreporter.apple.com.

    Please also let me know the Radar # once you have filed it.

    -Mike Jurewitz

    On Nov 8, 2007, at 12:38 AM, Jeffrey J. Early wrote:

    > I'm attempting to use an IKImageBrowserView in an application with
    > garbage collection, but have run into serious memory problems.
    >
    > The problem is easily produced using the ImageBrowser sample code:
    > http://developer.apple.com/samplecode/ImageBrowser/index.html
    >
    > If you compile and build the application under the default
    > conditions (no gc), adding about 500 typical digital photos barely
    > budges the memory footprint of the app. However, if you enable
    > garbage collection and do the same, the app will consume its 4.0 GB
    > of ram, before hitting the ceiling and crashing. Even a more mundane
    > experiment of adding a few photos shows that it doesn't manage to
    > reclaim its memory after loading the photos.
    >
    > Within the application a thread it spawned to add new photos, but it
    > seems to register with garbage collector just fine and wouldn't be a
    > problem memory-wise anyway. The problem, from what I can tell, is a
    > separate thread launched by IKImageBrowserView for generating the
    > thumbnails that doesn't get it's memory reclaimed.
    >
    >
    > Being new garbage collection, I'm not sure what to make of this --
    > any insight on how to fix this???
    >
    > Jeffrey
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today