Re: release not done right away
Re: release not done right away
- Subject: Re: release not done right away
- From: Nicolas Berloquin <email@hidden>
- Date: Wed, 21 Apr 2004 12:35:14 +0200
Humm, I really thought that all the instances that hold to these
objects would release them
before my "final" release, (I knew about what you describe), but I will
check my code to see
if by any chance one of them is not autoreleased.
btw is there any way to tell the main runloop to release its pool even
when no event are
processed ? Imagine if the app runs a few hours in the background,
keeping and keeping tons
of autoreleased objects waiting to be done with ? (My app does not need
to be in the
foreground to create those objects).
thank you !!
On 21 avr. 04, at 12:16, j o a r wrote:
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...
_______________________________________________
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.