From: burchard@horizon.math.utah.edu (Paul Burchard)
Subject: Re: Developer Support "core dump":  NXImage question
Organization: University of Minnesota
Date: Wed, 30 Sep 1992 00:59:42 GMT

P.S. Glad to see NeXT out here with us!   For inspiration, check out  
 
comp.sys.sgi to see what a positive effect active and informative participation by company volunteers can have...

--
--------------------------------------------------------------------
Paul Burchard	<burchard@geom.umn.edu>
``I'm still learning how to count backwards from infinity...''
--------------------------------------------------------------------
-------------------------------------
Paul Burchard	<burcha was having this problem despite making sure that this was NOT a shared image with any other part of the program, and further, I had been careful to FIRST change the cell's icon and THEN free the old one (in case -setIcon: somehow needs to "deinstall" the old icon):

    [cell setIcon:newIconName];
    [[NXImage findImageNamed:oldIconName] free]; //!!! still flaky

Nevertheless I still had the problem.  My conclusion was that *somewhere* in the bowels of the AppKit, a pointer to the old icon was still being cachrd@geom.umn.edu>
``I'm still learning how to count backwards from infinity...''
--------------------------------------------------------------------
-------------------------------------
Paul Burchard	<burcha was having this problem despite making sure that this was NOT a shared image with any other part of the program, and further, I had been careful to FIRST change the cell's icon and THEN free the old one (in case -setIcon: somehow needs to "deinstall" the old icon):

    [cell setIcon:newIconName];
    [[NXImage findImageNamed:oldIconName] free]; //!!! still flaky

Nevertheless I still had the problem.  My conclusion was that *somewhere* in the bowels of the AppKit, a pointer to the old icon was still being cached.  So to flush out any display caches I triggered an update before freeing the image:

    [cell setIcon:newIconName]; // cell == self->cell
    [self update]; // make sure image references flushed out of system!
    [[NXImage findImageNamed:oldIconName] free]; // OK!

This now appears to work.

--
--------------------------------------------------------------------
Paul Burchard	<burchard@geom.utah.edu>
``I'm still learning how to count backwards from infinity...''
-----------rd@geom.umn.edu>
``I'm still learning how to count backwards from infinity...''
--------------------------------------------------------------------
-------------------------------------
Paul Burchard	<burcha was having this problem despite making sure that this was NOT a shared image with any other part of the program, and further, I had been careful to FIRST change the cell's icon and THEN free the old one (in case -setIcon: somehow needs to "deinstall" the old icon):

    [cell setIcon:newIconName];
    [[NXImage findImageNamed:oldIconName] free]; //!!! still flaky

Nevertheless I still had the problem.  My conclusion was that *somewhere* in the bowels of the AppKit, a pointer to the old icon was still being cached.  So to flush out any display caches I triggered an update before freeing the image:

    [cell setIcon:newIconName]; // cell == self->cell
    [self update]; // make sure image references flushed out of system!
    [[NXImage findImageNamed:oldIconName] free]; // OK!

This now appears to work.

--
--------------------------------------------------------------------
Paul Burchard	<burchard@geom.utah.edu>
``I'm still learning how to count backwards from infinity...''
-----------------