Re: Releasing Object belonging to Core Data transient attribute
Re: Releasing Object belonging to Core Data transient attribute
- Subject: Re: Releasing Object belonging to Core Data transient attribute
- From: Greg Herlihy <email@hidden>
- Date: Tue, 14 Mar 2006 02:34:06 -0800
- Thread-topic: Releasing Object belonging to Core Data transient attribute
I think it would be necessary to see exactly what the code is currently
doing before making any other suggestions. Although I would venture that an
unmatched retain might be one possible theory.
And from your description it¹s not clear whether this data really needs to
be stored as an attribute in the object at all if its use is confined to a
single function.
Greg
On 3/14/06 12:53 AM, "David Chan" <email@hidden> wrote:
> Thanks Greg for the reply. I have tried setting it to nil previously but..
> Okay, I am not really sure how to use malloc debug tool but my memory
> allocation keep increasing as if the binary data in transient attribute is not
> released. My transient attribute function as a temporary place where I store
> the data I retrieve from an URL. And everytime I retrieve new data, the
> allocation will increase.
>
> That means I haven't release the attribue isn't it?
>
> Only when I quit the application does the memory allocation get reduced to the
> initial amount.
>
>
>
>
> On 3/14/06, Greg Herlihy <email@hidden> wrote:
>> Setting the transient attribute value to nil for an object should release
>> the value object (if there is one) which that attribute currently holds:
>>
>> [myCoreDataObject setValue:nil forKey:@"myTransientAttribute"];
>>
>> Note that this operation effectively clears the value of the object's
>> attribute, so any subsequent valueForKey:@"myTransientAttribute" message
>> sent to that object will return nil.
>>
>> Greg
>>
>> On 3/13/06 10:53 PM, "David Chan" <email@hidden> wrote:
>>
>>> > Hi all, I am working Core Data and one of my entity has a transient
>>> > attribute that temporarily store binary data. I understand that this
>>> > transient attribute's object will be released when I quit my application.
>>> > But is there a way I can release them immediately whenever I have no use
>>> for
>>> > the object anymore? Thanks..
>>> >
>>> > Regards
>>> > David
>>> > _______________________________________________
>>> > Do not post admin requests to the list. They will be ignored.
>>> > Cocoa-dev mailing list ( email@hidden)
>>> > Help/Unsubscribe/Update your Subscription:
>>> >
>>> > This email sent to email@hidden
>>
>>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden