Re: Editing Contexts and Autorelease Pools in 4.5.1
Re: Editing Contexts and Autorelease Pools in 4.5.1
- Subject: Re: Editing Contexts and Autorelease Pools in 4.5.1
- From: Chuck Hill <email@hidden>
- Date: Wed, 7 Nov 2007 10:08:13 -0800
On Nov 7, 2007, at 9:29 AM, Dana Kashubeck wrote:
Remember waaaaay back when WebObjects supported Objective-C /and/
Java? Well, travel back with me if you are able.
A trip down Memory Lane!
I'm working with an Objective-C port of the MultiECLockManager. I
ran into a really nasty situation because when you lock an editing
context, it creates an autorelease pool that is subsequently
released on unlock. Since autorelease pools work in stacks and I
was locking/unlocking an array of editing contexts, pools were
being released before I wanted them to. I did end up solving this
issue by going /backwards/ through the array of editing contexts
when unlocking.
That sounds familiar.
However, I'm wondering if there is a way to avoid this situation
altogether. It is a long-shot that anyone here will be able to
help (as you've all been writing Java apps for so long!), but I
thought it couldn't hurt to ask:
Does anyone have experience working with peer editing contexts in
Objective-C WO?
Yes, but my memory of that is so foggy that I can't be of use help.
Chuck and fondly remembering the days of my youth spent with Objective-C
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden