Re: super call in the middle of a block of code ..

2010-02-22 Thread Jeremy Pereira
On 19 Feb 2010, at 18:06, Clark Cox wrote: > On Fri, Feb 19, 2010 at 8:15 AM, Roland King wrote: >> why would that leak it? Those calls are paired, a table enters editing mode, >> the variable is set and what it's set to is retained, when the table exits >> editing mode again the cached value

Re: super call in the middle of a block of code ..

2010-02-19 Thread Clark Cox
On Fri, Feb 19, 2010 at 8:15 AM, Roland King wrote: > why would that leak it? Those calls are paired, a table enters editing mode, > the variable is set and what it's set to is retained, when the table exits > editing mode again the cached value is released and nil'ed. The variable is > also re

Re: super call in the middle of a block of code ..

2010-02-19 Thread Steve Christensen
Oh, sorry, I was looking at the routine on its own. You're hanging onto preEditPath for the duration of the editing period and then releasing it when it's done. It's still early and I haven't had any coffee. :) On Feb 19, 2010, at 8:15 AM, Roland King wrote: why would that leak it? Those

Re: super call in the middle of a block of code ..

2010-02-19 Thread Roland King
why would that leak it? Those calls are paired, a table enters editing mode, the variable is set and what it's set to is retained, when the table exits editing mode again the cached value is released and nil'ed. The variable is also released in dealloc (not shown here). I do not know of a case w

Re: super call in the middle of a block of code ..

2010-02-19 Thread Steve Christensen
Although it looks like your code is leaking a NSIndexPath each time through because you retain it on "if (editing)" and release it on "if (!editing)". On Feb 18, 2010, at 7:53 AM, Luke the Hiesterman wrote: This seems fine to me. Generally, when subclassing, the contract is that you must

Re: super call in the middle of a block of code ..

2010-02-18 Thread Luke the Hiesterman
This seems fine to me. Generally, when subclassing, the contract is that you must call super - there is nothing said about where in your method you do so. Luke On Feb 18, 2010, at 5:58 AM, Roland King wrote: > I have this piece of code in my UITableViewController subclass (that is also > my ta

super call in the middle of a block of code ..

2010-02-18 Thread Roland King
I have this piece of code in my UITableViewController subclass (that is also my tableview delegate) -(void)setEditing:(BOOL)editing animated:(BOOL)animated { if( editing ) preEditPath = [ [ [ self tableView ] indexPathForSelectedRow ] retain ]; [ super se