• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBrowser's reloadColumn: question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBrowser's reloadColumn: question


  • Subject: Re: NSBrowser's reloadColumn: question
  • From: James DiPalma <email@hidden>
  • Date: Sun, 29 Sep 2002 11:23:24 -0400

From: Anup Murarka <email@hidden>

If I use loadColumn: instead of reloadColumn:0, the cells immediately
release their objects.

I would have though loadColumnZero: and reloadColumn:0 to have displayed the
same behavior in this example.

NSMatrix has a method called renewRows:columns: that will set a matrix's number of rows/columns without releasing any cells. This method is for optimization and is used by NSBrowser during both loading methods. I added some logging to subclasses of NSMatrix and NSBrowser and found that loadColumnZero allocates a new matrix instance for column 0, while reloadColumn: does not.

I first call reloadColumn:0 and then call loadColumnZero. You can see that after loadColumnZero, a new matrix receives this browser's call to renewRows:columns: and column 0's previous matrix gets dealloced.

F[5314] browser 0xf0d100 reloadColumn:0 with matrix 0x1016ef0
F[5314] matrix 0x1016ef0 renewRows:10 columns:1
F[5314] browser 0xf0d100 loadColumnZero with matrix 0x1016ef0
F[5314] matrix 0x2580f0 renewRows:10 columns:1
F[5314] matrix 0x1016ef0 dealloc

That explains why your cells are not getting released during reloadColumn:, but I don't have a good answer for how to change this behavior.


-jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSBrowser's reloadColumn: question (From: Anup Murarka <email@hidden>)

  • Prev by Date: Re: DateFormatter in a table?
  • Next by Date: Re: Optimizing drawing by caching
  • Previous by thread: NSBrowser's reloadColumn: question
  • Next by thread: Basic Internet Connector...
  • Index(es):
    • Date
    • Thread