<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Ceki G&uuml;lc&uuml; wrote:
<blockquote cite="mid6.0.0.22.0.20070208223441.02e64fa0@mail.qos.ch"
 type="cite">
  <pre wrap="">
That's a tough one. You could indeed create a marker with a given name, 
delete it, and then recreate it with the same name. There could be classes 
or objects referring to the old marker instance. They would be holding a 
"dangling" reference. The old and new markers would behave the same, and 
could be used interchangeably, as long as they contained the same children.

Anyway, since most markers don't have children, and since deleting a marker 
is only necessary when creating many markers dynamically, deletion should 
not cause problems, even if it could be problematic under different 
circumstances.

  </pre>
  <blockquote type="cite">
    <pre wrap="">So removing is not the best solution?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I don't know. Do you have anything better in mind? :-)</pre>
</blockquote>
Looks quite difficult[1]. As posted before in this thread a solution is
needed (if MDC is not the best solution).<br>
<br>
One possibility:<br>
A child marker does not inherit "by reference" but "by value". Would
mean:<br>
<br>
p = Marker.getMarker("Parent");<br>
c = p.getChild("child");<br>
Marker.remove(p);<br>
afterRemoveParent = Marker.getMarker("Parent");<br>
// afterRemoveParent.equals(p) == true<br>
afterRemoveChild = afterRemoveParent.getChild("child");<br>
// afterRemoveChild.equals(c) == true<br>
<br>
Comparing with '==' instead of the 'equals' method is in most cases bad
practise, so most use cases could live with that compromise<br>
to use the equals method.<br>
<br>
Regards<br>
Boris<br>
<br>
[1] He very much enjoys writing software, altough he is discovering
that it is far more difficult than what it might seem initially.<br>
<br>
</body>
</html>