Editing contexts broadcast (via NSNotificationCenter) notifications when 
changes are made (see EditingContextDidSaveChangesNotification) and other 
editing contexts listen for these.  If you dispose of an ec as soon as you no 
longer need it, NSNotificationCenter and the other ECs have less work to do.

Chuck


On 2011-07-20, at 4:11 PM, Philippe Rabier wrote:

> Sorry Mike, I don't get you. Can you be more specific?
> 
> Philippe
> 
> On 20 juil. 2011, at 16:42, Mike Schrag wrote:
> 
>>>> I am using an AjaxModalDialog when I create a new object for my app. The 
>>>> content of the AMD is from a component. When this component is created, I 
>>>> create an EC.
>>>> 
>>>> should I dispose() of this EC when I close the dialog? I guess this is a 
>>>> question of style. Will it be garbage collected on its own? or Do I gain 
>>>> anything if I theEC.dispose(); when I am done?
>>> Calling dispose() may / should result in the JVM having free memory sooner. 
>>>  It is not a big deal.
>> the bigger deal is disposing unregisters for NSNotifications, which can 
>> cause problems if you have a high volume app making EC's and leaving them 
>> around. for most apps, you probably won't notice.
>> 
>> ms _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/prabier%40me.com
>> 
>> This email sent to prab...@me.com
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to ch...@global-village.net

-- 
Chuck Hill             Senior Consultant / VP Development

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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to