Re: different EC for WODisplayGroup?
Re: different EC for WODisplayGroup?
- Subject: Re: different EC for WODisplayGroup?
- From: Chuck Hill <email@hidden>
- Date: Thu, 04 Nov 2004 10:59:51 -0800
At 01:39 PM 04/11/2004 -0500, Nathan Dumar wrote:
>Oh ... I hadn't thought of that. Thanks.
>
>My understanding of strong and weak references is foggy. Would you
>mind explaining what each one means?
Imagine two objects, A and B, where A has a relationship to B:
A -> B
If the relationship is strong, then B can't be garbage collected until A is
garbage collected or A removes its reference to B. This his how Java
objects normally work. Weak references stand in the middle:
A -> reference -> B
In this scenario, B can be garbage collected. They are used in cases where
object A can use a reference to object B, but does not absolutely require it.
>How can you tell when a reference is strong or weak?
Special classes are used to make weak references. Google 'Java weak
reference'. It is a Java thing, not a WO thing.
>I also found a better description under Legacy Technologies, at Apple:
>http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/
>WebObjects_5/Topics/ProgrammingTopics.15.html
>This gives me the understanding I need to do it. I should have looked
>a little harder before asking.
>
>Being a former IT technical writer, I don't know why they upgrade the
>documentation by making it less informative and less useful.
>
It increases consulting revenue. :-P
Chuck
>Nathan
>
>
>On Nov 4, 2004, at 12:32 PM, Chuck Hill wrote:
>
>> Probably nothing. The EC does not maintain strong references to the
>> EOs registered in it. It only maintains strong references to the
>> inserted/updated/deleted objects that are not yet saved. Just call
>> ec.revert() and you will have no strong references.
>>
>> Chuck
>>
>>
>> On Nov 4, 2004, at 9:11 AM, Nathan Dumar wrote:
>>
>>> Yes, I've read the documentation, but my understanding of the depths
>>> of WO is limited. How complicated is it to use a different editing
>>> context for a display group? I would like to dispose() the EC when
>>> I'm done with it, so I'm not keeping all those EOs around
>>> unnecessarily. What do I need to do?
>>>
>>> Thank you,
>>> Nathan
>
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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