removing global elements from XSDSchema [message #53632] |
Tue, 28 September 2004 11:45  |
Eclipse User |
|
|
|
Originally posted by: robinnt.us.ibm.com
When removing a global element from the XSDSchema will anonymous complex
types, particles, sequences, facets, and child elements be removed and
garbage collected or does each need to be explicitly removed from their
containers.
For example:
<xsd:element name=Address>
<xsd:complexType>
<vsequence>
<xsd:element name="street" type="string">
<xsd:element name="city" type="string">
<xsd:element name="state" type="string">
<xsd:element name="zip">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxExclusive value="100000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Is this code sufficient to remove the element "Address" and assure all the
referenced to the underlying objects have been removed so they can be
garbage collected.
xsdSchema.getContents.remove(elementAddress);
Otherwise, should I drill down through the underlying objects and remove
each individually to make sure all referenced have been removed so the objec
ts will be garbage collected.
Thanks.
Robin Noble-Thomas
|
|
|
|
Re: removing global elements from XSDSchema [message #53760 is a reply to message #53658] |
Tue, 28 September 2004 16:56  |
Eclipse User |
|
|
|
Originally posted by: robinnt.us.ibm.com
Ok thank you.
Robin
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:cjc1ho$qva$1@eclipse.org...
> Robin,
>
> It should be sufficient to remove a parent, since that will (typically)
> result in all the children becoming unreachable and hence collectible.
>
>
> Robin Noble-Thomas wrote:
>
> >When removing a global element from the XSDSchema will anonymous complex
> >types, particles, sequences, facets, and child elements be removed and
> >garbage collected or does each need to be explicitly removed from their
> >containers.
> >
> >For example:
> >
> ><xsd:element name=Address>
> > <xsd:complexType>
> > <vsequence>
> > <xsd:element name="street" type="string">
> > <xsd:element name="city" type="string">
> > <xsd:element name="state" type="string">
> > <xsd:element name="zip">
> > <xsd:simpleType>
> > <xsd:restriction base="xsd:positiveInteger">
> > <xsd:maxExclusive value="100000"/>
> > </xsd:restriction>
> > </xsd:simpleType>
> > </xsd:element>
> > </xsd:sequence>
> > </xsd:complexType>
> ></xsd:element>
> >
> >
> >Is this code sufficient to remove the element "Address" and assure all
the
> >referenced to the underlying objects have been removed so they can be
> >garbage collected.
> >
> >xsdSchema.getContents.remove(elementAddress);
> >
> >Otherwise, should I drill down through the underlying objects and remove
> >each individually to make sure all referenced have been removed so the
objec
> >ts will be garbage collected.
> >
> >Thanks.
> >
> >Robin Noble-Thomas
> >
> >
> >
> >
|
|
|
Re: removing global elements from XSDSchema [message #591911 is a reply to message #53632] |
Tue, 28 September 2004 12:00  |
Eclipse User |
|
|
|
Robin,
It should be sufficient to remove a parent, since that will (typically)
result in all the children becoming unreachable and hence collectible.
Robin Noble-Thomas wrote:
>When removing a global element from the XSDSchema will anonymous complex
>types, particles, sequences, facets, and child elements be removed and
>garbage collected or does each need to be explicitly removed from their
>containers.
>
>For example:
>
><xsd:element name=Address>
> <xsd:complexType>
> <vsequence>
> <xsd:element name="street" type="string">
> <xsd:element name="city" type="string">
> <xsd:element name="state" type="string">
> <xsd:element name="zip">
> <xsd:simpleType>
> <xsd:restriction base="xsd:positiveInteger">
> <xsd:maxExclusive value="100000"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
></xsd:element>
>
>
>Is this code sufficient to remove the element "Address" and assure all the
>referenced to the underlying objects have been removed so they can be
>garbage collected.
>
>xsdSchema.getContents.remove(elementAddress);
>
>Otherwise, should I drill down through the underlying objects and remove
>each individually to make sure all referenced have been removed so the objec
>ts will be garbage collected.
>
>Thanks.
>
>Robin Noble-Thomas
>
>
>
>
|
|
|
Re: removing global elements from XSDSchema [message #591958 is a reply to message #53658] |
Tue, 28 September 2004 16:56  |
Eclipse User |
|
|
|
Originally posted by: robinnt.us.ibm.com
Ok thank you.
Robin
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:cjc1ho$qva$1@eclipse.org...
> Robin,
>
> It should be sufficient to remove a parent, since that will (typically)
> result in all the children becoming unreachable and hence collectible.
>
>
> Robin Noble-Thomas wrote:
>
> >When removing a global element from the XSDSchema will anonymous complex
> >types, particles, sequences, facets, and child elements be removed and
> >garbage collected or does each need to be explicitly removed from their
> >containers.
> >
> >For example:
> >
> ><xsd:element name=Address>
> > <xsd:complexType>
> > <vsequence>
> > <xsd:element name="street" type="string">
> > <xsd:element name="city" type="string">
> > <xsd:element name="state" type="string">
> > <xsd:element name="zip">
> > <xsd:simpleType>
> > <xsd:restriction base="xsd:positiveInteger">
> > <xsd:maxExclusive value="100000"/>
> > </xsd:restriction>
> > </xsd:simpleType>
> > </xsd:element>
> > </xsd:sequence>
> > </xsd:complexType>
> ></xsd:element>
> >
> >
> >Is this code sufficient to remove the element "Address" and assure all
the
> >referenced to the underlying objects have been removed so they can be
> >garbage collected.
> >
> >xsdSchema.getContents.remove(elementAddress);
> >
> >Otherwise, should I drill down through the underlying objects and remove
> >each individually to make sure all referenced have been removed so the
objec
> >ts will be garbage collected.
> >
> >Thanks.
> >
> >Robin Noble-Thomas
> >
> >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.07979 seconds