[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about memory management

From: Germán Arias
Subject: Re: Question about memory management
Date: Wed, 05 Jun 2013 00:07:29 -0600
User-agent: GNUMail (Version 1.2.0)

Thanks for the explanation. I knew about static variables with strings (like 
And that these don't should be released. But I did not know that this applies to
other objects.


On 2013-06-04 23:55:15 -0600 Graham Lee <address@hidden> wrote:

> That's returning a shared static instance of the GSComboWindow class, so it's 
> expected that it isn't released. It's also outside of the NSComboBoxCell 
> class, so as far as NSComboBoxCell instances are concerned, they should obey 
> standard memory management rules:
> - if you got an object via +alloc, -copy or -new, you own it and should 
> -release or -autorelease it later.
> - if you didn't, you don't own it unless you -retain it
> - if you did neither of these, don't -release or -autorelease it.
> NSComboBoxCell is consistent with these rules.
> Graham.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]