That actually is a valid concern; since you're on the iPhone, memory
constraints are tight, and your view may actually be unloaded at some point.
Instead of doing additional initialization in awakeFromNib, (which has no
counterpart), I'd recommend doing your additional setup in viewDidLoad: on
the
DKJ wrote:
Thanks to all who replied. I was concerned whether the object might
somehow get re-instantiated from the nib without dealloc being
called first. If I understand memory management correctly, that
would produce a leak.
I'm assuming that the object wouldn't be re-instantiated with
Thanks to all who replied. I was concerned whether the object might
somehow get re-instantiated from the nib without dealloc being called
first. If I understand memory management correctly, that would produce
a leak.
I'm assuming that the object wouldn't be re-instantiated without its
pre
DKJ wrote:
Yes, I realise that. What I'm wondering is where to do it, since
it's initialised in the awakeFromNib method, rather than in
initWithFrame:.
It doesn't matter where it's initialized. The only thing that
matters is who owns it.
It is not only possible, but fairly common, for
There is no difference between initing them in initWithFrame and
awakeFromNib. You would release them in the same location. if they
need to be around for the life time of the view then release them
dealloc. If not call release before you leave awakeFromNib...
Scott Andrew
On Jul 18, 2009, a
On Jul 18, 2009, at 1:09 PM, DKJ wrote:
On 18-Jul-09, at 8:50 , Fritz Anderson wrote:
You have to release shadingAreas. You alloc'ed it, you own it.
Yes, I realise that. What I'm wondering is where to do it, since
it's initialised in the awakeFromNib method, rather than in
initWithFrame
On 18-Jul-09, at 8:50 , Fritz Anderson wrote:
You have to release shadingAreas. You alloc'ed it, you own it.
Yes, I realise that. What I'm wondering is where to do it, since it's
initialised in the awakeFromNib method, rather than in initWithFrame:.
The NSDictionary does store the CGMutabl
On 18 Jul 2009, at 10:16 AM, DKJ wrote:
On 18-Jul-09, at 8:08 , Fritz Anderson wrote:
How did you create the NSDictionary? Do you declare a property or
accessor methods for the instance variable? Did you use them? If a
property, does it have the copy or retain attributes?
Show your declarati
On 18-Jul-09, at 8:08 , Fritz Anderson wrote:
How did you create the NSDictionary? Do you declare a property or
accessor methods for the instance variable? Did you use them? If a
property, does it have the copy or retain attributes?
Show your declaration and initialization code.
This is w
On 18 Jul 2009, at 9:59 AM, DKJ wrote:
I've got a UIView object that uses an NSDictionary. The UIView is
instantiated from a nib, so I initialise the dictionary in
awakeFromNib, since the initWithFrame: method is never called. Is it
appropriate to release this dictionary in the UIView deall
10 matches
Mail list logo