Re: releasing a object containing others in a array

2009-10-03 Thread Kenneth Bruno II
As per: "You take ownership of an object if you create it using a method whose name begins with “alloc” or “new” or contains “copy” (for example, alloc, newObject, or mutableCopy), or if you

Re: releasing a object containing others in a array

2009-10-03 Thread Ken Thomases
On Oct 3, 2009, at 3:10 AM, Nick Rogers wrote: I have a class as following: @interface NodeTypeOrph : NSObject { int count; ItemTypeOrph*key[4]; // Warning: indexing starts at 0, not 1 NodeTypeOrph*branch[5]; // Fake pointers to ch

Re: releasing a object containing others in a array

2009-10-03 Thread Roland King
Well follow the memory management rules. You retained the objects when you put them in the array so you must release them. On 03-Oct-2009, at 16:10, Nick Rogers wrote: Hi, I have a class as following: @interface NodeTypeOrph : NSObject { intcount; ItemTypeOrph*k

releasing a object containing others in a array

2009-10-03 Thread Nick Rogers
Hi, I have a class as following: @interface NodeTypeOrph : NSObject { int count; ItemTypeOrph*key[4]; // Warning: indexing starts at 0, not 1 NodeTypeOrph*branch[5]; // Fake pointers to child nodes } when I'll send a release to an