Re: Newbie question: how to release an object that has been autoreleased
Re: Newbie question: how to release an object that has been autoreleased
- Subject: Re: Newbie question: how to release an object that has been autoreleased
- From: John Mikros <email@hidden>
- Date: Wed, 22 Sep 2004 10:48:55 -0700
If these buffer objects are being passed between threads then I'd
imagine that you'd want to avoid autorelease like the plague.
You don't want the object autoreleased while you're still using it in
the other thread.
-john
On Sep 22, 2004, at 8:04 AM, James Bucanek wrote:
In this particular case, these buffers are being created (from the
Pool object) and handed out to several threads which fill them with
data. These are eventually passed back to the original thread which
assembles them and writes them to disk. The number of buffer objects
can, in certain circumstances, become quite large (millions) and I
wanted to release them as soon as they had been written. There are
also concurrency issues as some threads will block if they pool of
available buffers is exhaushed. Releasing the buffer immediately
allows them to be returned to the pool immediately.
_______________________________________________
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