The concepts are related; Fraser's first link points to a great thread
(
http://groups.google.com/group/google-earth-browser-plugin/
browse_thread/thread/e83a6cc46f22942/cdde2f0ef944b8b8?
hl=en&lnk=gst&q=garbage#cdde2f0ef944b8b8) that has a good code example
explaining the add/remove child behavior and consequences.
Although one should be able to removeChild() any existing placemarks
without a problem, they aren't actually deleted from memory until the
JavaScript garbage collector chooses to do so. This prevents, for
example, creating placemarks with the same ID as a previously removed
placemark.
Because this is a tricky subject, it's best to examine the code in its
entirety to determine the cause of the unexpected behavior.
**Benjamin-- the best way to remove all overlays is simple iterate
through them like so:
var c = ge.getFeatures().getFirstChild();
while (c) {
var s = c.getNextSibling();
ge.getFeatures().removeChild(c);
c = s;
}
**K-- if you're still having this problem, feel free to post an
example link or larger code snippet so that we can help you
troubleshoot.
- Roman