Re: release not done right away
Re: release not done right away
- Subject: Re: release not done right away
- From: j o a r <email@hidden>
- Date: Wed, 21 Apr 2004 12:16:04 +0200
Release != dealloc. If you're objects are not deallocated when you
release them, that's because they are retained by some other object.
For example, if they are contained by some collection object that has
been autoreleased, the behaviour you describe could happen.
j o a r
On 2004-04-21, at 12.00, Nicolas Berloquin wrote:
>
I'm having (as usual) a very weird problem.
>
I have some objects that are allocated like:
>
>
[[NBPeer alloc] init];
>
I never call autorelease on them, only release when I'm done with them.
>
I setup an NSLog inside their dealloc, and I noticed that when my app
>
is in
>
the background and I switch to it, I get a batch of dealloc logs
>
showing up.
>
>
I would understand it for autorelease and the event loop being passed
>
through
>
at that time, but I thought that release happened right away.
>
>
Any idea what could cause this ???
>
>
PS this is a problem because this object's dealloc is not completely
>
instanteneous,
>
and switching to my app then takes some "perceptible" time, when
>
otherwise those
>
objets should get deallocated every so often...
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.