• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: disposing of an EC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disposing of an EC


  • Subject: Re: disposing of an EC
  • From: Mike Schrag <email@hidden>
  • Date: Wed, 20 Jul 2011 19:20:00 -0400

every ec in your system registers to receive nsnotifications. if you have an app under high load, you can accumulate large numbers of undisposed, not-yet-gc'd EC's. for apps of that profile, it's best to dispose ec's when you can. the profile of such an app is likely to be one where the request rate is very high and the request transaction time is very low (like a high volume rest service app, for instance). in ERRest we dispose its ec's for you, so you don't have to worry about that if you're using the controller's ec, but if you're doing your own thing, or making custom ec's, you may want to dispose.

profile, though. for most people, you're not going to have an app that is under load high enough to care about that.

ms

On Jul 20, 2011, at 7: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      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> 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

 _______________________________________________
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

References: 
 >disposing of an EC (From: Theodore Petrosky <email@hidden>)
 >Re: disposing of an EC (From: Chuck Hill <email@hidden>)
 >Re: disposing of an EC (From: Mike Schrag <email@hidden>)
 >Re: disposing of an EC (From: Philippe Rabier <email@hidden>)

  • Prev by Date: Re: disposing of an EC
  • Next by Date: Re: disposing of an EC
  • Previous by thread: Re: disposing of an EC
  • Next by thread: Re: disposing of an EC
  • Index(es):
    • Date
    • Thread